1
0
Fork 0
mirror of synced 2024-05-12 16:52:32 +12:00

Enable HSTS for all HTTPS requests

This commit is contained in:
Jake Barnby 2022-11-21 16:49:45 +13:00
parent 8f6a151980
commit 4a61718cff
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -223,7 +223,9 @@ App::init()
return $response->redirect('https://' . $request->getHostname() . $request->getURI());
}
}
if ($request->getProtocol() === 'https') {
$response->addHeader('Strict-Transport-Security', 'max-age=' . (60 * 60 * 24 * 126)); // 126 days
}