for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* src/SecurityTxtController.php.
*
* @author Austin Heap <[email protected]>
* @version v0.3.2
*/
declare(strict_types=1);
namespace AustinHeap\Security\Txt;
use Response;
* SecurityTxtController.
* @link https://github.com/austinheap/laravel-security-txt
* @link https://packagist.org/packages/austinheap/laravel-security-txt
* @link https://austinheap.github.io/laravel-security-txt/classes/AustinHeap.Security.Txt.SecurityTxtController.html
class SecurityTxtController extends \Illuminate\Routing\Controller
{
* Show the security.txt file.
* @return Response
public function show()
if (! config('security-txt.enabled', false)) {
abort(404);
}
return Response::make(
app('SecurityTxt')->fetch(),
200,
['Content-Type' => 'text/plain']
);
* Redirect to the proper location of the security.txt file.
public function redirect()
return redirect()->route('security.txt');
return redirect()->route('security.txt')
Illuminate\Http\RedirectResponse
Response