feat: Add support for registering accounts with the web UI

This commit is contained in:
Ginger committed 2026-06-29 09:35:50 -04:00
1 parent 47af5d3a39
commit e8d6fa565e
25 files changed
+1275 -508

No files matched your search

+7 -1
View File
@@ -49,11 +49,17 @@ pub(super) async fn template_context_middleware(
let mut response = next.run(request).await;
let child_src = if config.recaptcha_site_key.is_some() {
"www.google.com"
} else {
"'none'"
};
response.headers_mut().insert(
header::CONTENT_SECURITY_POLICY,
HeaderValue::from_str(&format!(
"default-src 'none'; style-src 'self'; img-src 'self' 'https' data:; script-src \
'nonce-{csp_nonce}';"
'nonce-{csp_nonce}'; child-src {child_src};"
))
.expect("should be able to build CSP header"),
);