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