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:
Simon Welsh 2012-11-01 21:15:43 +13:00
parent 7d095a12e9
commit 0b279a2cbc
2 changed files with 2 additions and 0 deletions

View File

@ -403,6 +403,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
* This is used in the CMS.
*/
public function ping() {
Requirements::clear();
return 1;
}

View File

@ -40,6 +40,7 @@
$.ajax({
url: 'admin/security/ping',
global: false,
type: 'POST',
complete: onSessionLost
});
}, this.getPingIntervalSeconds() * 1000);