public function HealthController::content in Health check 8
Health check.
Return value
\Symfony\Component\HttpFoundation\Response The response.
1 string reference to 'HealthController::content'
File
- src/
Controller/ HealthController.php, line 19
Class
- HealthController
- Controller for route that simply returns current time without page cache.
Namespace
Drupal\health_check\ControllerCode
public function content() {
// Use plain response with timestamp.
$response = new Response();
$response->headers
->set('Content-Type', 'text/plain');
$response
->setContent(time());
return $response;
}