fix(security): allow HTMX CDN and inline scripts in CSP
script-src now permits 'unsafe-inline' and https://unpkg.com so the autocomplete script and HTMX library load correctly.
This commit is contained in:
parent
2b072e4de3
commit
a9ae69cad5
1 changed files with 1 additions and 1 deletions
|
|
@ -80,7 +80,7 @@ func SecurityHeaders(cfg SecurityHeadersConfig) func(http.Handler) http.Handler
|
|||
func defaultCSP() string {
|
||||
return strings.Join([]string{
|
||||
"default-src 'self'",
|
||||
"script-src 'self'",
|
||||
"script-src 'self' 'unsafe-inline' https://unpkg.com",
|
||||
"style-src 'self' 'unsafe-inline'",
|
||||
"img-src 'self' https: data:",
|
||||
"connect-src 'self'",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue