From 7170ca5dfd7945474c64a737d9cbd0b6d92a5951 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 24 Jul 2022 20:34:30 +0200 Subject: Correct CSP header --- netlify-pr.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'netlify-pr.go') diff --git a/netlify-pr.go b/netlify-pr.go index 6e6eb54..e232627 100644 --- a/netlify-pr.go +++ b/netlify-pr.go @@ -47,9 +47,9 @@ func main() { repStr = "${1} app.netlify.com${3}" newStr = reStr.ReplaceAllString(newStr, repStr) - // -> script-src 'self' www.googletagmanager.com hypothes.is; - // <- script-src 'self' www.googletagmanager.com hypothes.is netlify-cdp-loader.netlify.app; - reStr = regexp.MustCompile(`(script-src) ('self' www\.googletagmanager\.com hypothes\.is)(;)`) + // -> script-src 'self' www.googletagmanager.com hypothes.is cdn.hypothes.is; + // <- script-src 'self' www.googletagmanager.com hypothes.is cdn.hypothes.is netlify-cdp-loader.netlify.app; + reStr = regexp.MustCompile(`(script-src) ('self' www\.googletagmanager\.com hypothes\.is cdn\.hypothes\.is)(;)`) repStr = "${1} ${2} netlify-cdp-loader.netlify.app${3}" newStr = reStr.ReplaceAllString(newStr, repStr) -- cgit v1.2.3