@@ -2,23 +2,42 @@ events {
22 worker_connections 4096 ; ## Default: 1024
33}
44http {
5- server_tokens off; # hides server version within headers
5+
6+ include /etc/nginx/mime.types ;
7+ default_type application/octet-stream ;
8+
9+ types {
10+ application/javascript mjs;
11+ }
12+ server_tokens off;
613 server {
14+
15+ root /usr/share/nginx/html;
16+
717 listen $CONTAINER_PORT ;
818 add_header Cache-Control "no-store, no-cache" always;
19+
20+ add_header Cache-Control "no-store" always;
921 add_header Pragma "no-cache" always;
1022 add_header Strict-Transport-Security "max-age=63072000" always;
11- add_header Content-Security-Policy "frame-ancestors 'none '; img-src 'self'; script-src 'self'; style-src 'self'; object-src 'self' https://$CLOUDFRONT_DOMAIN_NAME;" always;
23+ add_header Content-Security-Policy "frame-ancestors 'self '; img-src 'self' blob: ; script-src 'self'; style-src 'self' 'unsafe-inline '; object-src 'self' https://$CLOUDFRONT_DOMAIN_NAME;" always;
1224 add_header Referrer-Policy "no-referrer" always;
13- add_header Permissions-Policy "Permissions-Policy: accelerometer=(self), ambient-light-sensor=(self), autoplay=(self), battery=(self), camera=(self), cross-origin-isolated=(self), display-capture=(self), document-domain=(self), encrypted-media=(self), execution-while-not-rendered=(self), execution-while-out-of-viewport=(self), fullscreen=(self), geolocation=(self), gyroscope=(self), keyboard-map=(self), magnetometer=(self), microphone=(self), midi=(self), navigation-override=(self), payment=(self), picture-in-picture=(self), publickey-credentials-get=(self), screen-wake-lock=(self), sync-xhr=(self), usb=(self), web-share=(self), xr-spatial-tracking=(self), clipboard-read=(self), clipboard-write=(self), gamepad=(self), speaker-selection=(self), conversion-measurement=(self), focus-without-user-activation=(self), hid=(self), idle-detection=(self), interest-cohort=(self), serial=(self), sync-script=(self), trust-token-redemption=(self), unload=(self), window-placement=(self), vertical-scroll=(self) " always;
25+ add_header Permissions-Policy "accelerometer=(self), autoplay=(self), camera=(self), cross-origin-isolated=(self), display-capture=(self), encrypted-media=(self), fullscreen=(self), geolocation=(self), gyroscope=(self), keyboard-map=(self), magnetometer=(self), microphone=(self), midi=(self), payment=(self), picture-in-picture=(self), publickey-credentials-get=(self), screen-wake-lock=(self), sync-xhr=(self), usb=(self), xr-spatial-tracking=(self), clipboard-read=(self), clipboard-write=(self), gamepad=(self), hid=(self), idle-detection=(self), interest-cohort=(self), serial=(self), unload=(self) " always;
1426 add_header X-Content-Type-Options "nosniff" always;
1527 add_header X-Frame-Options "DENY" always;
1628 add_header X-Permitted-Cross-Domain-Policies "none" always;
29+
1730 location / {
18- root /usr/share/nginx/html;
1931 index index .html index .htm;
20- include /etc/nginx/mime.types ;
2132 try_files $uri $uri / /index .html$is_args$args ;
2233 }
34+
35+ location /pdfjs/ {
36+ add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'self'; img-src 'self' blob: data:; script-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; connect-src 'self' blob: https:;" always;
37+ add_header Permissions-Policy "fullscreen=()" always;
38+ add_header X-Frame-Options "SAMEORIGIN" always;
39+ try_files $uri $uri / /index .html$is_args$args ;
40+ }
41+
2342 }
2443}
0 commit comments