mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-31 02:54:09 +02:00
87 lines
3.0 KiB
Plaintext
87 lines
3.0 KiB
Plaintext
location ~ ^/(en|ar|be|da|de|es|fr|id|it|nl|pt|tr|vi|zh|zh-TW)(/.*)?$ {
|
|
try_files $uri $uri/ $uri.html /$1/index.html /index.html;
|
|
expires 5m;
|
|
add_header Cache-Control "public, must-revalidate";
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
}
|
|
|
|
location ~ ^/(.+?)/(en|ar|be|da|de|es|fr|id|it|nl|pt|tr|vi|zh|zh-TW)(/.*)?$ {
|
|
try_files $uri $uri/ $uri.html /$1/$2/index.html /$1/index.html /index.html;
|
|
expires 5m;
|
|
add_header Cache-Control "public, must-revalidate";
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
}
|
|
|
|
location ~* \.html$ {
|
|
expires 1h;
|
|
add_header Cache-Control "public, must-revalidate";
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
}
|
|
|
|
location ~* /libreoffice-wasm/soffice\.wasm\.gz$ {
|
|
gzip off;
|
|
types {} default_type application/wasm;
|
|
add_header Content-Encoding gzip;
|
|
add_header Vary "Accept-Encoding";
|
|
add_header Cache-Control "public, immutable";
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
}
|
|
|
|
location ~* /libreoffice-wasm/soffice\.data\.gz$ {
|
|
gzip off;
|
|
types {} default_type application/octet-stream;
|
|
add_header Content-Encoding gzip;
|
|
add_header Vary "Accept-Encoding";
|
|
add_header Cache-Control "public, immutable";
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
}
|
|
|
|
location ~* \.(wasm|wasm\.gz|data|data\.gz)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
}
|
|
|
|
location ~* \.(js|mjs|css|woff|woff2|ttf|eot|otf)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
}
|
|
|
|
location ~* \.(png|jpg|jpeg|gif|ico|svg|webp|avif|mp4|webm)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location ~* \.json$ {
|
|
expires 1w;
|
|
add_header Cache-Control "public, must-revalidate";
|
|
}
|
|
|
|
location ~* \.pdf$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ $uri.html /index.html;
|
|
expires 5m;
|
|
add_header Cache-Control "public, must-revalidate";
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
}
|
|
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
|
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
|
add_header Cross-Origin-Resource-Policy "cross-origin" always;
|