nginx: adapt csp for profile pages

This commit is contained in:
Vincent Breitmoser 2020-07-31 11:20:32 +02:00
parent 29018f024d
commit 149a698a3f
1 changed files with 8 additions and 0 deletions

View File

@ -225,6 +225,14 @@ location /search {
location ~ "^/([A-Za-z0-9._-]+)@([A-Za-z0-9._-]+)$" {
limit_req zone=search_email burst=50 nodelay;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
# add_header Content-Security-Policy "default-src 'none'; script-src 'self'; img-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; frame-ancestors 'none'; base-uri 'none'; form-action 'self'; report-uri https://keysopenpgporg.report-uri.com/r/d/csp/enforce" always;
add_header Content-Security-Policy "default-src 'none'; script-src 'self'; connect-src https:; img-src 'self' https://www.gravatar.com; style-src 'self' 'unsafe-inline'; font-src 'self'; frame-ancestors 'none'; base-uri 'none'; form-action 'self'; report-uri https://keysopenpgporg.report-uri.com/r/d/csp/enforce" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Expect-CT 'max-age=31536000, report-uri="https://keysopenpgporg.report-uri.com/r/d/ct/reportOnly"' always;
error_page 429 /errors/429/rate-limit-web;
proxy_pass http://127.0.0.1:8080;
}