fix: only pass /api/ routes to nginx

This fixes rendering of 404 routes.
This commit is contained in:
kolaente
2024-09-23 10:45:35 +02:00
parent 44c3734089
commit 39da1e4132
+3 -2
View File
@@ -30,7 +30,7 @@ server {
location / {
root /app/dist/client/;
try_files $uri $uri/index.html @nodejs;
try_files $uri $uri/index.html =404;
}
location /survey {
@@ -39,11 +39,12 @@ server {
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location @nodejs {
location /api/ {
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Scheme $scheme;