server { listen 80; server_name auth-server-poc; client_max_body_size 200M; location / { limit_except OPTIONS { auth_basic "auth-server-poc static auth"; auth_basic_user_file "/opt/auth-server-poc/userdb/.htpasswd"; } uwsgi_pass unix:///tmp/uwsgi.sock; default_type application/json; include uwsgi_params; uwsgi_param REMOTE_USER $remote_user; uwsgi_param AUTH_TYPE Basic; } }