Browse Source
Merge pull request #347 from TBK/patch-1
Add Feature-Policy header
pull/348/head
Daniel García
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
0 deletions
-
src/util.rs
|
|
@ -15,6 +15,7 @@ impl Fairing for AppHeaders { |
|
|
|
} |
|
|
|
|
|
|
|
fn on_response(&self, _req: &Request, res: &mut Response) { |
|
|
|
res.set_raw_header("Feature-Policy", "accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; camera 'none'; encrypted-media 'none'; fullscreen 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; picture-in-picture 'none'; sync-xhr 'self' https://haveibeenpwned.com https://twofactorauth.org; usb 'none'; vr 'none'"); |
|
|
|
res.set_raw_header("Referrer-Policy", "same-origin"); |
|
|
|
res.set_raw_header("X-Frame-Options", "SAMEORIGIN"); |
|
|
|
res.set_raw_header("X-Content-Type-Options", "nosniff"); |
|
|
|