I'm considering something similar for protecting some simple ML serving API endpoints. Just put a proxy in between.
Something like
https://github.com/gogatekeeper/gatekeeper/blob/master/docs/...
It's no problem to set up Django, but I don't want to have to separately protect all public endpoints.