mirror of
https://github.com/stackrender/stackrender.git
synced 2026-09-09 18:55:42 +00:00
add COOP/COEP headers to nginx config to fix macOS database crashes
This commit is contained in:
@@ -15,6 +15,11 @@ server {
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
|
||||
# Putting these at the server level ensures BOTH index.html AND your cached .js/.wasm assets use them!
|
||||
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
||||
|
||||
# Handle client-side routing
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
@@ -24,5 +29,7 @@ server {
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|wasm)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user