worker_processes auto; pid /tmp/nginx.pid; error_log stderr warn; events { worker_connections 1024; } http { access_log off; client_body_temp_path /tmp/client; proxy_temp_path /tmp/proxy; fastcgi_temp_path /tmp/fastcgi; uwsgi_temp_path /tmp/uwsgi; scgi_temp_path /tmp/scgi; server { listen 8443 ssl; ssl_protocols TLSv1.2 TLSv1.3; ssl_certificate /run/meddeid/fullchain.pem; ssl_certificate_key /run/meddeid/privkey.pem; client_max_body_size 2m; location = /_authorize { internal; proxy_pass_request_body off; proxy_pass_request_headers off; proxy_set_header Content-Length ""; proxy_set_header Authorization $http_authorization; proxy_ssl_server_name on; proxy_ssl_verify on; proxy_ssl_trusted_certificate /run/meddeid/authorization-ca.pem; include /run/meddeid/authorize.conf; } location / { auth_request /_authorize; proxy_set_header Authorization ""; proxy_http_version 1.1; proxy_set_header Connection ""; proxy_request_buffering off; proxy_buffering off; proxy_read_timeout 120s; resolver 127.0.0.11 valid=10s ipv6=off; set $model_api meddeid:8000; proxy_pass http://$model_api; } } }