Keep https check

https://github.com/nextcloud/server/issues/41196 + keep https check

Co-authored-by: Louis <louis@chmn.me>
Signed-off-by: Gaspard d'Hautefeuille <github@dhautefeuille.eu>
pull/43525/head
Gaspard d'Hautefeuille 2024-01-04 22:35:44 +07:00 committed by John Molakvoæ
parent 7418c3e1f4
commit 7e7a4ddd5c
1 changed files with 4 additions and 1 deletions

@ -106,7 +106,10 @@ class LoginController extends Controller {
$this->session->set('clearingExecutionContexts', '1');
$this->session->close();
if (!$this->request->isUserAgent([Request::USER_AGENT_CHROME, Request::USER_AGENT_ANDROID_MOBILE_CHROME])) {
if (
$this->request->getServerProtocol() === 'https' &&
!$this->request->isUserAgent([Request::USER_AGENT_CHROME, Request::USER_AGENT_ANDROID_MOBILE_CHROME])
) {
$response->addHeader('Clear-Site-Data', '"cache", "storage"');
}