silverstripe-environmentcheck/code/DevHealthController.php
Sean Harvey e11e4349f9 Output check result and details as JSON if requested.
Can be either automatically if the Accept header is "application/json"
or suffixed with "json" extension, e.g. dev/check.json
2015-04-09 09:41:13 +12:00

16 lines
336 B
PHP

<?php
class DevHealthController extends Controller {
public static $allowed_actions = array(
'index'
);
function index() {
$e = new EnvironmentChecker('health', 'Site health');
$e->init(''); //empty permission check, the "health" check does not require a permission check to run
$e->setErrorCode(404);
return $e;
}
}