Skip to content

Commit 478b9e8

Browse files
authored
nginx:grunt: move add_header to location block, add always (#59)
1 parent 83d3101 commit 478b9e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/profile/templates/gruntjscom/site.nginx.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ server {
1212
error_log /var/log/nginx/error.log crit;
1313
server_tokens off;
1414

15-
# Add Content Security Policy headers
16-
add_header Content-Security-Policy-Report-Only "default-src 'self'; script-src 'self' code.jquery.com; connect-src 'self'; img-src 'self'; style-src 'self'; report-to https://csp-report-api.openjs-foundation.workers.dev/";
17-
1815
location / {
1916
proxy_pass http://localhost:<%= @backend_port %>;
2017
proxy_redirect off;
2118
proxy_buffering off;
19+
20+
# Add Content Security Policy headers
21+
add_header Content-Security-Policy-Report-Only "default-src 'self'; script-src 'self' code.jquery.com; connect-src 'self'; img-src 'self'; style-src 'self'; report-to https://csp-report-api.openjs-foundation.workers.dev/" always;
2222
}
2323

2424
location /.well-known/acme-challenge {

0 commit comments

Comments
 (0)