Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Permissions-Policy header #572

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions benches/header_map/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ const STD: &'static [HeaderName] = &[
LOCATION,
MAX_FORWARDS,
ORIGIN,
PERMISSIONS_POLICY,
PRAGMA,
PROXY_AUTHENTICATE,
PROXY_AUTHORIZATION,
Expand Down
1 change: 1 addition & 0 deletions src/header/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ pub use self::name::{
LOCATION,
MAX_FORWARDS,
ORIGIN,
PERMISSIONS_POLICY,
PRAGMA,
PROXY_AUTHENTICATE,
PROXY_AUTHORIZATION,
Expand Down
8 changes: 8 additions & 0 deletions src/header/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,14 @@ standard_headers! {
/// whole path.
(Origin, ORIGIN, b"origin");

/// Allows selectively enabling and disabling use of various browser features
/// and APIs.
///
/// Permissions Policy is a web platform API which gives a website the
/// ability to allow or block the use of browser features in it's own
/// frame or in iframes that it embeds.
(PermissionsPolicy, PERMISSIONS_POLICY, b"permissions-policy");

/// HTTP/1.0 header usually used for backwards compatibility.
///
/// The Pragma HTTP/1.0 general header is an implementation-specific header
Expand Down
1 change: 1 addition & 0 deletions tests/header_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ const STD: &'static [HeaderName] = &[
LOCATION,
MAX_FORWARDS,
ORIGIN,
PERMISSIONS_POLICY,
PRAGMA,
PROXY_AUTHENTICATE,
PROXY_AUTHORIZATION,
Expand Down
1 change: 1 addition & 0 deletions tests/header_map_fuzz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ fn gen_header_name(g: &mut StdRng) -> HeaderName {
header::LOCATION,
header::MAX_FORWARDS,
header::ORIGIN,
header::PERMISSIONS_POLICY,
header::PRAGMA,
header::PROXY_AUTHENTICATE,
header::PROXY_AUTHORIZATION,
Expand Down