attempt to fix api/api calls

This commit is contained in:
Cipher Vance
2025-11-22 22:27:54 -06:00
parent 12b527e145
commit 919559c32e

View File

@@ -25,8 +25,11 @@ server {
add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Cache-Control "no-cache, no-store, must-revalidate";
} }
# API proxy # API proxy - strip /api prefix and send to backend
location /api/ { location /api/ {
# Remove /api prefix when proxying
rewrite ^/api/(.*)$ /$1 break;
proxy_pass https://dev-api.rideaware.org; proxy_pass https://dev-api.rideaware.org;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Host dev-api.rideaware.org; proxy_set_header Host dev-api.rideaware.org;
@@ -50,6 +53,7 @@ server {
return 204; return 204;
} }
} }
# SPA - route all requests to index.html # SPA - route all requests to index.html
location / { location / {