From 61d61feb938bb8a6c79044ac5b48d685b608ce0f Mon Sep 17 00:00:00 2001 From: Tommy Date: Fri, 16 Sep 2022 18:45:58 -0400 Subject: [PATCH] Improve headers for security --- data/conf/nginx/includes/site-defaults.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/conf/nginx/includes/site-defaults.conf b/data/conf/nginx/includes/site-defaults.conf index ef2c4fb8..ec47a544 100644 --- a/data/conf/nginx/includes/site-defaults.conf +++ b/data/conf/nginx/includes/site-defaults.conf @@ -13,14 +13,16 @@ ssl_session_timeout 1d; ssl_session_tickets off; - add_header Strict-Transport-Security "max-age=15768000;"; + add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"; add_header X-Content-Type-Options nosniff; - add_header X-XSS-Protection "1; mode=block"; + add_header X-XSS-Protection "0"; add_header X-Robots-Tag none; add_header X-Download-Options noopen; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Permitted-Cross-Domain-Policies none; add_header Referrer-Policy strict-origin; + add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), camera=(), clipboard-read=(), display-capture=(), document-domain=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), hid=(), idle-detection=(), interest-cohort=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), screen-wake-lock=(), serial=(), usb=(), sync-xhr=(), xr-spatial-tracking=()"; + add_header Content-Security-Policy "default-src 'none'; connect-src 'self'; font-src 'self'; img-src * https: data:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; frame-ancestors 'none'; block-all-mixed-content; base-uri 'none'"; index index.php index.html;