1405/7/18-fix bug in daily question
This commit is contained in:
+19
-3
@@ -5,7 +5,23 @@ server {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
# Hashed build assets must never fall back to index.html.
|
||||
# Otherwise missing JS/CSS returns text/html and browsers throw MIME errors.
|
||||
location /assets/ {
|
||||
try_files $uri =404;
|
||||
access_log off;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
|
||||
location ~* \.(?:js|css|png|jpg|jpeg|gif|ico|svg|webp|woff2?|ttf|eot|webmanifest|map)$ {
|
||||
try_files $uri =404;
|
||||
access_log off;
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user