Display HSTS headers only when HTTPS is used
This commit is contained in:
parent
f51aae9b16
commit
94ce6f1364
|
|
@ -125,7 +125,9 @@ class Response
|
|||
|
||||
public function hsts()
|
||||
{
|
||||
header('Strict-Transport-Security: max-age=31536000');
|
||||
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
|
||||
header('Strict-Transport-Security: max-age=31536000');
|
||||
}
|
||||
}
|
||||
|
||||
public function xframe($mode = 'DENY', array $urls = array())
|
||||
|
|
|
|||
Loading…
Reference in New Issue