Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

varnish: remove Content-Security-Policy header #3841

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
218 changes: 0 additions & 218 deletions modules/varnish/data/csp.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions modules/varnish/manifests/init.pp
Expand Up @@ -38,8 +38,6 @@
notify => Service['varnish'],
}

$module_path = get_module_path($module_name)
$csp = loadyaml("${module_path}/data/csp.yaml")
$backends = lookup('varnish::backends')
$interval_check = lookup('varnish::interval-check')
$interval_timeout = lookup('varnish::interval-timeout')
Expand Down
3 changes: 0 additions & 3 deletions modules/varnish/templates/default.vcl
Expand Up @@ -756,9 +756,6 @@ sub vcl_deliver {
# Disable Google ad targeting (FLoC)
set resp.http.Permissions-Policy = "interest-cohort=(), browsing-topics=()";

# Content Security Policy
set resp.http.Content-Security-Policy = "<%- @csp.each_pair do |type, value| -%> <%= type %> <%= value.join(' ') %>; <%- end -%>";

# For a 500 error, do not set cookies
if (resp.status >= 500 && resp.http.Set-Cookie) {
unset resp.http.Set-Cookie;
Expand Down