Merge pull request #5490 from nextcloud/add-clear-site-data-header
Add Clear-Site-Data header
This commit is contained in:
commit
57c5a15e41
|
@ -107,7 +107,9 @@ class LoginController extends Controller {
|
||||||
}
|
}
|
||||||
$this->userSession->logout();
|
$this->userSession->logout();
|
||||||
|
|
||||||
return new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm'));
|
$response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm'));
|
||||||
|
$response->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"');
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -95,6 +95,7 @@ class LoginControllerTest extends TestCase {
|
||||||
->willReturn('/login');
|
->willReturn('/login');
|
||||||
|
|
||||||
$expected = new RedirectResponse('/login');
|
$expected = new RedirectResponse('/login');
|
||||||
|
$expected->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"');
|
||||||
$this->assertEquals($expected, $this->loginController->logout());
|
$this->assertEquals($expected, $this->loginController->logout());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,6 +125,7 @@ class LoginControllerTest extends TestCase {
|
||||||
->willReturn('/login');
|
->willReturn('/login');
|
||||||
|
|
||||||
$expected = new RedirectResponse('/login');
|
$expected = new RedirectResponse('/login');
|
||||||
|
$expected->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"');
|
||||||
$this->assertEquals($expected, $this->loginController->logout());
|
$this->assertEquals($expected, $this->loginController->logout());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue