fix(webrtc): update CSP to allow background processor wasm and blob execution
This commit is contained in:
@@ -11,8 +11,14 @@ func SecurityHeaders(next http.Handler) http.Handler {
|
|||||||
w.Header().Set("X-Frame-Options", "DENY")
|
w.Header().Set("X-Frame-Options", "DENY")
|
||||||
w.Header().Set("Referrer-Policy", "strict-origin-when-cross-origin")
|
w.Header().Set("Referrer-Policy", "strict-origin-when-cross-origin")
|
||||||
w.Header().Set("Content-Security-Policy",
|
w.Header().Set("Content-Security-Policy",
|
||||||
"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; "+
|
"default-src 'self'; "+
|
||||||
"img-src 'self' https: data:; connect-src 'self' wss: ws:; font-src 'self';")
|
"script-src 'self' 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' blob: https://cdn.jsdelivr.net https://unpkg.com; "+
|
||||||
|
"worker-src 'self' blob:; "+
|
||||||
|
"child-src 'self' blob:; "+
|
||||||
|
"style-src 'self' 'unsafe-inline'; "+
|
||||||
|
"img-src 'self' https: data: blob:; "+
|
||||||
|
"connect-src 'self' wss: ws: https:; "+
|
||||||
|
"font-src 'self';")
|
||||||
w.Header().Set("Permissions-Policy", "camera=(self), microphone=(self), geolocation=()")
|
w.Header().Set("Permissions-Policy", "camera=(self), microphone=(self), geolocation=()")
|
||||||
next.ServeHTTP(w, r)
|
next.ServeHTTP(w, r)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user