Skip to content

Commit

Permalink
nginx:grunt: move add_header to location block, add always (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil authored Aug 26, 2024
1 parent 83d3101 commit 478b9e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/profile/templates/gruntjscom/site.nginx.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ server {
error_log /var/log/nginx/error.log crit;
server_tokens off;

# Add Content Security Policy headers
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/";

location / {
proxy_pass http://localhost:<%= @backend_port %>;
proxy_redirect off;
proxy_buffering off;

# Add Content Security Policy headers
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;
}

location /.well-known/acme-challenge {
Expand Down

0 comments on commit 478b9e8

Please sign in to comment.