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