Skip to content

Commit a77ff88

Browse files
authored
Replace link for creating CSP (#1564)
* Replace link for creating CSP * Update extra-security.conf to match upstream * Update extra-security.conf without overwriting the three upper options
1 parent f9b770b commit a77ff88

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

roles/nginx/templates/h5bp/directive-only/extra-security.conf

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,27 @@ add_header X-Content-Type-Options nosniff always;
1010
# The header instructs IE to enable its inbuilt anti-cross-site scripting filter.
1111
add_header X-XSS-Protection "1; mode=block" always;
1212

13-
# with Content Security Policy (CSP) enabled (and a browser that supports it (http://caniuse.com/#feat=contentsecuritypolicy),
14-
# you can tell the browser that it can only download content from the domains you explicitly allow
15-
# CSP can be quite difficult to configure, and cause real issues if you get it wrong
16-
# There is website that helps you generate a policy here http://cspisawesome.com/
13+
# Mitigate the risk of cross-site scripting and other content-injection
14+
# attacks.
15+
#
16+
# This can be done by setting a Content Security Policy which permits
17+
# trusted sources of content for your website.
18+
#
19+
# There is no policy that fits all websites, you will have to modify the
20+
# `Content-Security-Policy` directives in the example depending on your needs.
21+
#
22+
# To make your CSP implementation easier, you can use an online CSP header
23+
# generator such as:
24+
# https://report-uri.com/home/generate/
25+
#
26+
# It is encouraged that you validate your CSP header using a CSP validator
27+
# such as:
28+
# https://csp-evaluator.withgoogle.com
29+
#
30+
# https://www.w3.org/TR/CSP/
31+
# https://owasp.org/www-project-secure-headers/#content-security-policy
32+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
33+
# https://developers.google.com/web/fundamentals/security/csp
34+
# https://content-security-policy.com/
35+
1736
# add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' https://www.google-analytics.com;" always;

0 commit comments

Comments
 (0)