This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1- Create a Middleware: | |
$ php artisan make:middleware XFrameHeadersMiddleware | |
Content: | |
<?php | |
namespace App\Http\Middleware; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class SecureHeadersMiddleware | |
{ | |
// Enumerate headers which you do not want in your application's responses. | |
// Great starting point would be to go check out @Scott_Helme's: | |
// https://securityheaders.com/ |