public function SecuritytxtController::securitytxtFile in Security.txt 8
Get the security.txt file as a response object.
Return value
\Symfony\Component\HttpFoundation\Response The security.txt file as a response object with a content type of 'text/plain'.
1 string reference to 'SecuritytxtController::securitytxtFile'
File
- src/
Controller/ SecuritytxtController.php, line 60
Class
- SecuritytxtController
- Controller routines for securitytxt routes.
Namespace
Drupal\securitytxt\ControllerCode
public function securitytxtFile() {
$content = $this->serializer
->getSecuritytxtFile($this->settings);
$response = new Response($content, 200, [
'Content-Type' => 'text/plain',
]);
return $response;
}