From 037eb0b790b06ebeeead9f9ff9fe802dc05db1e0 Mon Sep 17 00:00:00 2001 From: dheimerl <34488243+dheimerl@users.noreply.github.com> Date: Sat, 15 Dec 2018 13:23:07 -0600 Subject: [PATCH] Update web.rs Add frame-ancestors to allow U2F to work in Chrome (and possibly Firefox) extension --- src/api/web.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/web.rs b/src/api/web.rs index 8db632a..e395504 100644 --- a/src/api/web.rs +++ b/src/api/web.rs @@ -56,6 +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://*"); Ok(res) },