Skip to content

Instantly share code, notes, and snippets.

View Nelli-dev's full-sized avatar

Nelli-Dev Nelli-dev

View GitHub Profile
@Nelli-dev
Nelli-dev / laravel-x-frame-options.txt
Created August 24, 2021 09:28 — forked from EduardoSP6/laravel-x-frame-options.md
How to set X-Frame-Options headers in Laravel
1- Create a Middleware:
$ php artisan make:middleware XFrameHeadersMiddleware
Content:
<?php
namespace App\Http\Middleware;
@chetans9
chetans9 / SecureHeadersMiddleware.php
Last active August 11, 2024 09:27
Laravel Secure Headers Middleware
<?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/