Fix some issues 2
This commit is contained in:
@@ -93,13 +93,11 @@ server {
|
||||
}
|
||||
|
||||
# Main location block for SPA routing
|
||||
# Note: JS/CSS files are handled by specific location blocks above with try_files $uri =404
|
||||
# This ensures missing assets return 404 instead of index.html (which causes MIME type errors)
|
||||
location / {
|
||||
try_files $uri $uri/ @fallback;
|
||||
}
|
||||
|
||||
# Fallback for SPA routing - serve index.html
|
||||
location @fallback {
|
||||
rewrite ^.*$ /index.html last;
|
||||
# Don't fallback to index.html for asset files - they should 404 if missing
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Health check endpoint
|
||||
|
||||
Reference in New Issue
Block a user