From 7f7c9360493c863f7297222b32f49c408ea558e2 Mon Sep 17 00:00:00 2001 From: dheimerl <34488243+dheimerl@users.noreply.github.com> Date: Mon, 17 Dec 2018 22:59:53 -0600 Subject: [PATCH] Fixed web.rs --- src/api/web.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/web.rs b/src/api/web.rs index e395504d..31bfe3a0 100644 --- a/src/api/web.rs +++ b/src/api/web.rs @@ -56,8 +56,8 @@ impl<'r, R: Responder<'r>> Responder<'r> for WebHeaders { res.set_raw_header("X-Frame-Options", "SAMEORIGIN"); res.set_raw_header("X-Content-Type-Options", "nosniff"); res.set_raw_header("X-XSS-Protection", "1; mode=block"); - res.set_raw_header("Content-Security-Policy", "frame-ancestors chrome-extension://*"); - res.set_raw_header("Content-Security-Policy", "frame-ancestors moz-extension://*"); + let csp = "frame-ancestors chrome-extension://nngceckbapebfimnlniiiahkandclblb moz-extension://* ".to_owned() + &CONFIG.domain + ";"; + res.set_raw_header("Content-Security-Policy", csp); Ok(res) },