mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-09-24 02:38:44 +00:00
Re-added referrer policy since mw implementation does not include response header
This commit is contained in:
parent
36f0c07fa5
commit
def3f44ed0
|
@ -177,6 +177,17 @@ class SkinCitizen extends SkinTemplate {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the referrer header if enabled in 'CitizenEnableStrictReferrerPolicy'
|
||||
*/
|
||||
private function addStrictReferrerPolicy() {
|
||||
if ( $this->getConfigValue( 'CitizenEnableStrictReferrerPolicy' ) === true ) {
|
||||
// iOS Safari, IE, Edge compatiblity
|
||||
$this->out->getRequest()->response()->header( 'Referrer-Policy: strict-origin' );
|
||||
$this->out->getRequest()->response()->header( 'Referrer-Policy: strict-origin-when-cross-origin' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the Feature policy header to the response if enabled in 'CitizenFeaturePolicyDirective'
|
||||
*/
|
||||
|
|
|
@ -87,6 +87,12 @@
|
|||
"descriptionmsg": "citizen-config-enablexxssprotection",
|
||||
"public": true
|
||||
},
|
||||
"EnableStrictReferrerPolicy": {
|
||||
"value": false,
|
||||
"description": "Enable or disable strict-origin-when-cross-origin referrer policy",
|
||||
"descriptionmsg": "citizen-config-enablestrictreferrerpolicy",
|
||||
"public": true
|
||||
},
|
||||
"EnableFeaturePolicy": {
|
||||
"value": false,
|
||||
"description": "Enable or disable Feature Policy",
|
||||
|
|
Loading…
Reference in a new issue