From: Gaspard d'Hautefeuille Date: Thu, 4 Jan 2024 20:35:44 +0000 (+0200) Subject: Keep https check X-Git-Tag: v29.0.0beta1~547^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=08ff644f3cba2723324dd4c01adf1bfad66d01b0;p=nextcloud-server.git Keep https check https://github.com/nextcloud/server/issues/41196 + keep https check Co-authored-by: Louis Signed-off-by: Gaspard d'Hautefeuille --- diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index fe2a16ec4d3..a1e2b08ab21 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -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"'); }