This commit is contained in:
Anthony Stirling 2025-07-29 11:18:58 +01:00
parent 0021a8eded
commit dc6735d360

View File

@ -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;