attempt to fix api/api calls
This commit is contained in:
@@ -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;
|
||||||
@@ -51,6 +54,7 @@ server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# SPA - route all requests to index.html
|
# SPA - route all requests to index.html
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
|
|||||||
Reference in New Issue
Block a user