commit 037eb0b790b06ebeeead9f9ff9fe802dc05db1e0
parent a335bcd682cf3141118288018090fcd2d055ce2a
Author: dheimerl <34488243+dheimerl@users.noreply.github.com>
Date: Sat, 15 Dec 2018 13:23:07 -0600
Update web.rs
Add frame-ancestors to allow U2F to work in Chrome (and possibly Firefox) extension
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/api/web.rs b/src/api/web.rs
@@ -56,6 +56,8 @@ impl<'r, R: Responder<'r>> Responder<'r> for WebHeaders<R> {
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)
},