mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-11-22 12:55:28 +03:00
Reformat CSP header for readability
This commit is contained in:
parent
382e6107fe
commit
f3c8c16d79
1 changed files with 20 additions and 6 deletions
22
src/util.rs
22
src/util.rs
|
@ -63,14 +63,28 @@ impl Fairing for AppHeaders {
|
|||
// app.simplelogin.io, app.anonaddy.com, api.fastmail.com
|
||||
let csp = format!(
|
||||
"default-src 'self'; \
|
||||
object-src 'self' blob:; \
|
||||
script-src 'self'{script_src}; \
|
||||
style-src 'self' 'unsafe-inline'; \
|
||||
img-src 'self' data: https://haveibeenpwned.com/ https://www.gravatar.com {icon_service_csp}; \
|
||||
child-src 'self' https://*.duosecurity.com https://*.duofederal.com; \
|
||||
frame-src 'self' https://*.duosecurity.com https://*.duofederal.com; \
|
||||
connect-src 'self' https://api.pwnedpasswords.com/range/ https://2fa.directory/api/ https://app.simplelogin.io/api/ https://app.anonaddy.com/api/ https://api.fastmail.com/; \
|
||||
object-src 'self' blob:; \
|
||||
frame-ancestors 'self' chrome-extension://nngceckbapebfimnlniiiahkandclblb chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh moz-extension://* {allowed_iframe_ancestors};",
|
||||
frame-ancestors 'self' \
|
||||
chrome-extension://nngceckbapebfimnlniiiahkandclblb \
|
||||
chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh \
|
||||
moz-extension://* \
|
||||
{allowed_iframe_ancestors}; \
|
||||
img-src 'self' data: \
|
||||
https://haveibeenpwned.com/ \
|
||||
https://www.gravatar.com \
|
||||
{icon_service_csp}; \
|
||||
connect-src 'self' \
|
||||
https://api.pwnedpasswords.com/range/ \
|
||||
https://2fa.directory/api/ \
|
||||
https://app.simplelogin.io/api/ \
|
||||
https://app.anonaddy.com/api/ \
|
||||
https://api.fastmail.com/ \
|
||||
;\
|
||||
",
|
||||
icon_service_csp = CONFIG._icon_service_csp(),
|
||||
allowed_iframe_ancestors = CONFIG.allowed_iframe_ancestors()
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue