40 lines
1.0 KiB
Nginx Configuration File
40 lines
1.0 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Resource-Policy "same-origin" always;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location = /service-worker.js {
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
expires off;
|
|
}
|
|
|
|
location ~* \.(wasm|js|mjs)$ {
|
|
types {
|
|
application/wasm wasm;
|
|
application/javascript js mjs;
|
|
}
|
|
|
|
try_files $uri =404;
|
|
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Resource-Policy "same-origin" always;
|
|
}
|
|
|
|
location ~* \.(css|png|jpg|jpeg|gif|ico|svg|woff|woff2|webp)$ {
|
|
try_files $uri =404;
|
|
expires 7d;
|
|
add_header Cache-Control "public";
|
|
}
|
|
}
|