Cybersecurity-Projects/api-security-scanner/conf/nginx/http.conf

29 lines
758 B
Plaintext

# ⒸAngelaMos | 2025
# Shared HTTP configuration for both dev and prod
# This file contains common settings used by dev.nginx and prod.nginx
# Upstream backend (FastAPI)
upstream backend {
server backend:8000;
}
# Upstream frontend (Vite dev server in dev, static files in prod)
upstream frontend {
server frontend:5173;
}
# Common proxy settings
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
# Timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;