Hosting of static files seems to be a recurring topic, but I could not find a solution to my problem:
I’m just finishing my first small Django app. It is a toy app with a few pages and will not have more than 20-30 users in the near future. But it allows to upload images and those images should only be visible to logged in users.
I’m aware that static files should not be served by the Django app, but by a dedicated web server like Nginx. But the whole “collectstatic” workflow works only for static files that are known upfront like JS and CSS.
I know that with Nginx I could probably get Authentication Based on Subrequest Result | NGINX Documentation to work with Django. But then I have to manage Nginx myself.
But I would prefer to use a “serverless” solution like DigitalOcean, Render, …
Does anybody know a managed solution where I can serve uploaded files in a protected way?