1
0
Fork 0
mirror of synced 2024-04-28 09:52:36 +12:00

Merge pull request #4735 from appwrite/fix-hsts

Enable HSTS for all HTTPS requests
This commit is contained in:
Christy Jacob 2022-11-21 22:11:50 +05:30 committed by GitHub
commit de8552e901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}