diff --git a/docker/frontend/nginx.conf b/docker/frontend/nginx.conf index 34ba0beaa..af4ca85f2 100644 --- a/docker/frontend/nginx.conf +++ b/docker/frontend/nginx.conf @@ -52,9 +52,9 @@ http { proxy_request_buffering off; } - # Proxy Swagger UI to backend - location /swagger-ui/ { - proxy_pass ${VITE_API_BASE_URL}/swagger-ui/; + # Proxy Swagger UI to backend (including versioned paths) + location ~ ^/swagger-ui(.*)$ { + proxy_pass ${VITE_API_BASE_URL}/swagger-ui$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; @@ -68,9 +68,9 @@ http { proxy_cache off; } - # Proxy API docs to backend - location /v3/api-docs { - proxy_pass ${VITE_API_BASE_URL}/v3/api-docs; + # Proxy API docs to backend (with query parameters and sub-paths) + location ~ ^/v3/api-docs(.*)$ { + proxy_pass ${VITE_API_BASE_URL}/v3/api-docs$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; @@ -79,9 +79,9 @@ http { proxy_set_header X-Forwarded-Port $server_port; } - # Proxy v1 API docs to backend - location /v1/api-docs { - proxy_pass ${VITE_API_BASE_URL}/v1/api-docs; + # Proxy v1 API docs to backend (with query parameters and sub-paths) + location ~ ^/v1/api-docs(.*)$ { + proxy_pass ${VITE_API_BASE_URL}/v1/api-docs$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;