mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Changes ping to POST and clears Requirements for ping
GET requests can, and do, get cached. Using POST forces them not to. Clears requirements so that the SecurityAdmin JS isn't injected.
This commit is contained in:
parent
7d095a12e9
commit
0b279a2cbc
@ -403,6 +403,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
||||
* This is used in the CMS.
|
||||
*/
|
||||
public function ping() {
|
||||
Requirements::clear();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@
|
||||
$.ajax({
|
||||
url: 'admin/security/ping',
|
||||
global: false,
|
||||
type: 'POST',
|
||||
complete: onSessionLost
|
||||
});
|
||||
}, this.getPingIntervalSeconds() * 1000);
|
||||
|
Loading…
x
Reference in New Issue
Block a user