fix: include default mime.types to prevent octet-stream download
This commit is contained in:
parent
31e10030c1
commit
c3fa8684cc
10
nginx.conf
10
nginx.conf
@ -5,14 +5,14 @@ server {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
# WASM needs correct MIME type
|
include /etc/nginx/mime.types;
|
||||||
types {
|
types {
|
||||||
application/wasm wasm;
|
application/wasm wasm;
|
||||||
}
|
}
|
||||||
|
|
||||||
# SharedArrayBuffer requires these headers (used by audio/video workers)
|
# SharedArrayBuffer requires these headers (used by audio/video workers)
|
||||||
add_header Cross-Origin-Opener-Policy "same-origin";
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||||
add_header Cross-Origin-Embedder-Policy "require-corp";
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
||||||
|
|
||||||
# SPA fallback
|
# SPA fallback
|
||||||
location / {
|
location / {
|
||||||
@ -23,8 +23,8 @@ server {
|
|||||||
location ~* \.(js|css|wasm|woff2|woff|ttf|png|jpg|webp|svg|ico)$ {
|
location ~* \.(js|css|wasm|woff2|woff|ttf|png|jpg|webp|svg|ico)$ {
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
add_header Cross-Origin-Opener-Policy "same-origin";
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||||
add_header Cross-Origin-Embedder-Policy "require-corp";
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
||||||
}
|
}
|
||||||
|
|
||||||
gzip on;
|
gzip on;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user