public function Domain301RedirectController::check in Domain 301 Redirect 8
1 string reference to 'Domain301RedirectController::check'
File
- src/
Controller/ Domain301RedirectController.php, line 64
Class
- Domain301RedirectController
- Controller to check that the domain is working.
Namespace
Drupal\domain_301_redirect\ControllerCode
public function check() {
$response = new CacheableJsonResponse([
'enabled' => $this->config
->get('enabled'),
]);
return $response
->addCacheableDependency(CacheableMetadata::createFromRenderArray([
'#cache' => [
'max-age' => 0,
'contexts' => [
'url.query_args:token',
],
'tags' => [
'config:domain_301_redirect.settings',
],
],
]));
}