bug fix
This commit is contained in:
@@ -6,12 +6,19 @@ server {
|
||||
# Hashed build assets can be cached forever.
|
||||
location /assets/ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
try_files $uri =404;
|
||||
try_files $uri @strip_prefix;
|
||||
}
|
||||
|
||||
# Single page app: always serve index.html.
|
||||
location / {
|
||||
add_header Cache-Control "no-cache";
|
||||
try_files $uri /index.html;
|
||||
try_files $uri @strip_prefix;
|
||||
}
|
||||
|
||||
# The reverse proxy may forward requests with their path prefix
|
||||
# (e.g. /website/assets/app.js). Drop leading segments until a file
|
||||
# matches; everything else is the single page app.
|
||||
location @strip_prefix {
|
||||
rewrite ^/[^/]+(/.+)$ $1 last;
|
||||
rewrite ^ /index.html last;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user