mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-28 08:10:45 +00:00
Added HSTS preload support
This commit is contained in:
parent
97d3e2ccb2
commit
6ee9ce7f98
|
@ -52,6 +52,7 @@ class SkinCitizen extends SkinTemplate {
|
|||
|
||||
$hstsmaxage = $this->getConfig()->get( 'CitizenHSTSMaxAge' );
|
||||
$hstsincludesubdomains = $this->getConfig()->get( 'CitizenHSTSIncludeSubdomains' );
|
||||
$hstspreload = $this->getConfig()->get( 'CitizenHSTSPreload' );
|
||||
|
||||
// HSTS max age
|
||||
if ( is_int( $hstsmaxage ) ) {
|
||||
|
@ -61,7 +62,7 @@ class SkinCitizen extends SkinTemplate {
|
|||
$hstsmaxage = 300;
|
||||
}
|
||||
|
||||
$out->getRequest()->response()->header( 'Strict-Transport-Security: max-age=' . $hstsmaxage . ( $hstsincludesubdomains ? '; includeSubDomains' : '' ) );
|
||||
$out->getRequest()->response()->header( 'Strict-Transport-Security: max-age=' . $hstsmaxage . ( $hstsincludesubdomains ? '; includeSubDomains' : '' ) . ( $hstspreload ? '; preload' : '' ) );
|
||||
}
|
||||
// Deny X-Frame-Options
|
||||
if ( $this->getConfig()->get( 'CitizenEnableDenyXFrameOptions' ) ) {
|
||||
|
|
|
@ -49,6 +49,12 @@
|
|||
"descriptionmsg": "citizen-config-hstsincludesubdomains",
|
||||
"public": true
|
||||
},
|
||||
"HSTSPreload": {
|
||||
"value": false,
|
||||
"description": "Enable or disable HSTS preload",
|
||||
"descriptionmsg": "citizen-config-hstspreload",
|
||||
"public": true
|
||||
},
|
||||
"EnableDenyXFrameOptions": {
|
||||
"value": false,
|
||||
"description": "Enable or disable the deny X-Frame-Options header",
|
||||
|
|
Loading…
Reference in a new issue