From eeb9f6fb42c80d99be7cfb99008f6563c4317a97 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Wed, 23 Sep 2026 23:54:38 +0200 Subject: [PATCH] feat(www): add `Permissions-Policy` header to deny privacy related API access. --- test/e2e2/spec/test_www.py | 1 + www/conf/sites-available/90-desec.static.location | 1 + 2 files changed, 2 insertions(+) diff --git a/test/e2e2/spec/test_www.py b/test/e2e2/spec/test_www.py index cedea763d..fc931b050 100644 --- a/test/e2e2/spec/test_www.py +++ b/test/e2e2/spec/test_www.py @@ -166,6 +166,7 @@ def test_security_headers(api_anon, url): "block-all-mixed-content; form-action 'none';", 'X-Frame-Options': 'deny', 'X-Content-Type-Options': 'nosniff', + 'Permissions-Policy': 'camera=(), microphone=(), geolocation=(), payment=()', 'Referrer-Policy': 'strict-origin-when-cross-origin', 'X-XSS-Protection': '1; mode=block', } diff --git a/www/conf/sites-available/90-desec.static.location b/www/conf/sites-available/90-desec.static.location index cdf8dec93..a1d357299 100644 --- a/www/conf/sites-available/90-desec.static.location +++ b/www/conf/sites-available/90-desec.static.location @@ -13,6 +13,7 @@ location / { add_header Content-Security-Policy "default-src 'self'; frame-src 'none'; connect-src 'self'; font-src 'self' data:; img-src 'self' data:; media-src data:; script-src 'self'; style-src 'self' 'unsafe-inline'; base-uri 'self'; frame-ancestors 'none'; block-all-mixed-content; form-action 'none';" always; add_header X-Frame-Options "deny" always; add_header X-Content-Type-Options "nosniff" always; + add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header X-XSS-Protection "1; mode=block" always; }