summaryrefslogtreecommitdiffstats
path: root/netlify-pr.go
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-07-24 21:04:38 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-07-24 21:04:38 +0200
commitf3e7ebb4a9ef2463fef4de2f9b05fc8b70adba79 (patch)
tree1adaad554a3057a2516cb9af157597a7dc339885 /netlify-pr.go
parent2096b43f2c4006e28fef713136142d33ecbf27be (diff)
downloadgohugo-theme-ed-f3e7ebb4a9ef2463fef4de2f9b05fc8b70adba79.tar.gz
Correct CSP header
Diffstat (limited to 'netlify-pr.go')
-rw-r--r--netlify-pr.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/netlify-pr.go b/netlify-pr.go
index f3e5057..58630fd 100644
--- a/netlify-pr.go
+++ b/netlify-pr.go
@@ -41,10 +41,10 @@ func main() {
repStr = "${1} ${2} blob: https://app.netlify.com${3}"
newStr = reStr.ReplaceAllString(newStr, repStr)
- // -> frame-src 'none';
- // <- frame-src app.netlify.com;
- reStr = regexp.MustCompile("(frame-src) ('none')(;)")
- repStr = "${1} app.netlify.com${3}"
+ // -> frame-src hypothes.is;
+ // <- frame-src hypothes.is app.netlify.com;
+ reStr = regexp.MustCompile(`(frame-src) (hypothes\.is)(;)`)
+ repStr = "${1} ${2} app.netlify.com${3}"
newStr = reStr.ReplaceAllString(newStr, repStr)
// -> script-src 'self' www.googletagmanager.com hypothes.is cdn.hypothes.is;