]> source.dussan.org Git - nextcloud-server.git/commitdiff
Keep https check 42544/head
authorGaspard d'Hautefeuille <github@dhautefeuille.eu>
Thu, 4 Jan 2024 20:35:44 +0000 (22:35 +0200)
committerSimon L <szaimen@e.mail.de>
Fri, 5 Jan 2024 03:20:26 +0000 (04:20 +0100)
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>
core/Controller/LoginController.php

index fe2a16ec4d38305f2cffc590ba0a57362e25bd4c..a1e2b08ab218a7c3456055133f36cec7e8bcc838 100644 (file)
@@ -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"');
                }