Skip to content

Commit

Permalink
Keep https check
Browse files Browse the repository at this point in the history
nextcloud#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 szaimen committed Jan 5, 2024
1 parent 85911cb commit 08ff644
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 08ff644

Please sign in to comment.