fix: add 'unsafe-inline' to script-src CSP so onclick handlers work
This commit is contained in:
parent
814cba1f53
commit
2d259a2b7c
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
|
@ -133,7 +133,7 @@ func main() {
|
|||
w.Header().Set("X-Frame-Options", "DENY")
|
||||
w.Header().Set("Referrer-Policy", "strict-origin-when-cross-origin")
|
||||
w.Header().Set("Content-Security-Policy",
|
||||
"default-src 'self'; img-src 'self' data:; script-src 'self' https://unpkg.com/htmx.org@1.9.10; style-src 'self' 'unsafe-inline'")
|
||||
"default-src 'self'; img-src 'self' data:; script-src 'self' https://unpkg.com/htmx.org@1.9.10 'unsafe-inline'; style-src 'self' 'unsafe-inline'")
|
||||
next.ServeHTTP(w, r)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue