fix: update nginx configuration to streamline proxy settings for Gunicorn

This commit is contained in:
FuzzyGrim
2025-03-23 16:13:18 +01:00
parent c55136b2db
commit c46f3131b0

View File

@@ -34,6 +34,14 @@ http {
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
# Proxy to Gunicorn
location / {
proxy_pass http://app_server;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /health/ {
access_log off;
proxy_pass http://app_server;
@@ -49,12 +57,5 @@ http {
add_header Cache-Control "public";
}
# Proxy to Gunicorn
location / {
proxy_pass http://app_server;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}