mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 00:01:55 +00:00
fix(backend): improve csp (#861)
rationale for setting `'unsafe-inline'` is that it cannot be more void than the lack of `script-src` but it still might add some benefits
This commit is contained in:
committed by
GitHub
parent
c05a080d1a
commit
2562f98cbc
@@ -80,7 +80,7 @@ fn serve_path(path: String, can_set_security_headers: bool) -> Response<BoxBody>
|
||||
}
|
||||
|
||||
fn set_security_headers(mut res: Builder) -> Builder {
|
||||
let csp = "frame-ancestors 'none'; frame-src 'none'; worker-src 'self'; child-src 'none'; object-src 'none'";
|
||||
let csp = "frame-ancestors 'none'; frame-src 'none'; worker-src 'self'; child-src 'none'; object-src 'none'; script-src 'self' 'unsafe-inline'";
|
||||
res = res.header("Content-Security-Policy", csp);
|
||||
res = res.header("X-Frame-Options", "DENY");
|
||||
res = res.header("X-Content-Type-Options", "nosniff");
|
||||
|
||||
Reference in New Issue
Block a user