Skip to content

Commit

Permalink
Keep https check
Browse files Browse the repository at this point in the history
#41196 + keep https check

Co-authored-by: Louis <louis@chmn.me>
Signed-off-by: Gaspard d'Hautefeuille <github@dhautefeuille.eu>
  • Loading branch information
2 people authored and skjnldsv committed Feb 22, 2024
1 parent 7418c3e commit 7e7a4dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ public function logout() {
$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"');
}

Expand Down

0 comments on commit 7e7a4dd

Please sign in to comment.