mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Send header to all browsers under HTTPS
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Don't send Clear-Site-Data to Safari Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Fix lint Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
This commit is contained in:
parent
e493e72ffb
commit
cfd7a57184
1 changed files with 2 additions and 2 deletions
|
|
@ -34,7 +34,6 @@ declare(strict_types=1);
|
|||
*/
|
||||
namespace OC\Core\Controller;
|
||||
|
||||
use OC\AppFramework\Http\Request;
|
||||
use OC\Authentication\Login\Chain;
|
||||
use OC\Authentication\Login\LoginData;
|
||||
use OC\Authentication\WebAuthn\Manager as WebAuthnManager;
|
||||
|
|
@ -125,7 +124,8 @@ 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 feature is available only in secure contexts
|
||||
$response->addHeader('Clear-Site-Data', '"cache", "storage"');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue