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/42544/head
Gaspard d'Hautefeuille 5 months ago committed by Simon L
parent 85911cbab2
commit 08ff644f3c

@ -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"');
}

Loading…
Cancel
Save