Skip to content

Commit

Permalink
Feature policy to permissions policy
Browse files Browse the repository at this point in the history
  • Loading branch information
bitslip6 authored Dec 30, 2020
1 parent c0c9699 commit 0a89ace
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function send_security_headers(?array $request) : void {

header("X-Frame-Options: deny");
header("X-Content-Type-Options: nosniff");
header("X-XSS-Protection: 1; report=$path");
header("Referer-Policy: strict-origin-when-cross-origin");
header("X-XSS-Protection: 1; mode=block");
header("Referrer-Policy: strict-origin-when-cross-origin");
header('Report-To: {"group":"bitfire","max_age":2592000,"endpoints":[{"url"'.$path.'"}],"include_subdomains":true}');

// set strict transport security (HSTS)
Expand All @@ -39,8 +39,8 @@ function send_security_headers(?array $request) : void {
if (\BitFire\Config::enabled("default_feature_policy")) {
// TODO: replace with reduce_map
header(\TF\map_reduce(FEATURE_POLICY, function($key, $value, $carry) {
return $carry . $key . " '$value'; ";
}, "Feature-Policy: ") );
return $carry . $key . "=('$value'), ";
}, "Permissions-Policy: ") );
}

if (\BitFire\Config::enabled("nel")) {
Expand Down

0 comments on commit 0a89ace

Please sign in to comment.