diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index 12096d5ba..a5e0eb6b6 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -207,6 +207,17 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } + # Catch-all for /api/ routes not covered above (e.g. /api/v1/auth/*). + # More specific prefix and regex locations above still take precedence. + location /api/ { + proxy_pass http://gateway; + proxy_http_version 1.1; + 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; + } + # All other requests go to frontend location / { proxy_pass http://frontend;