This commit is contained in:
Luke Gustafson
2024-11-27 03:55:53 +00:00
parent 3ee91ed963
commit 8e6923b7a0
3 changed files with 25 additions and 28 deletions

View File

@@ -7,7 +7,7 @@ server {
root /usr/share/nginx/html;
index index.html;
# Frontend routes
# Frontend routes (SPA)
location / {
try_files $uri /index.html;
}
@@ -19,5 +19,13 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_redirect off; # Disable automatic redirects by the backend (if any)
}
# Optional: Custom error handling
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}