If you run nginx anyway, why not serve static files from nginx? No need for temporary files, no extra disk space.
The authorization can probably be done somehow in nginx as well.
The authorization can probably be done somehow in nginx as well.
https://nginx.org/en/docs/http/ngx_http_auth_request_module....