optional support for public key pinning
This commit is contained in:
parent
f4968e9f45
commit
3c88184177
7
boot.php
7
boot.php
@ -2126,6 +2126,9 @@ function construct_page(&$a) {
|
||||
$profile = $a->profile;
|
||||
|
||||
header("Content-type: text/html; charset=utf-8");
|
||||
|
||||
// security headers - see https://securityheaders.io
|
||||
|
||||
if($a->get_scheme() === 'https')
|
||||
header("Strict-Transport-Security: max-age=31536000");
|
||||
|
||||
@ -2137,6 +2140,10 @@ function construct_page(&$a) {
|
||||
header("X-Content-Type-Options: nosniff");
|
||||
}
|
||||
|
||||
if($a->config['system']['public_key_pins']) {
|
||||
header("Public-Key-Pins: " . $a->config['system']['public_key_pins']);
|
||||
}
|
||||
|
||||
require_once(theme_include(
|
||||
((x($a->page, 'template')) ? $a->page['template'] : 'default' ) . '.php' )
|
||||
);
|
||||
|
Reference in New Issue
Block a user