Try to fix nginx config on prod.
This commit is contained in:
parent
85fd9de6ee
commit
cf57049744
1 changed files with 3 additions and 0 deletions
|
|
@ -47,6 +47,9 @@ server {
|
||||||
location /assets/ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; }
|
location /assets/ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; }
|
||||||
location ~ ^/workbox-.*\.js$ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; }
|
location ~ ^/workbox-.*\.js$ { add_header Cache-Control "public, max-age=31536000, immutable"; try_files $uri =404; }
|
||||||
|
|
||||||
|
# The MapLibre worker is an ES module (.mjs); nginx's stock mime.types has no entry for it and module scripts need a JavaScript MIME type.
|
||||||
|
location ~ \.mjs$ { default_type text/javascript; add_header Cache-Control "no-cache"; try_files $uri =404; }
|
||||||
|
|
||||||
# Data files keep their names: revalidate (the service worker precaches them by content hash).
|
# Data files keep their names: revalidate (the service worker precaches them by content hash).
|
||||||
location /data/ { add_header Cache-Control "no-cache"; try_files $uri =404; }
|
location /data/ { add_header Cache-Control "no-cache"; try_files $uri =404; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue