We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfdcc85 commit c77567aCopy full SHA for c77567a
src/render.rs
@@ -42,7 +42,9 @@ impl<'a, W: std::io::Write> HeaderContext<W> {
42
pub fn new(app_state: Arc<AppState>, request_context: RequestContext, writer: W) -> Self {
43
let mut response = HttpResponseBuilder::new(StatusCode::OK);
44
response.content_type("text/html; charset=utf-8");
45
- response.insert_header(&request_context.content_security_policy);
+ if app_state.config.content_security_policy.is_none() {
46
+ response.insert_header(&request_context.content_security_policy);
47
+ }
48
Self {
49
app_state,
50
request_context,
0 commit comments