sloyakuza/laravel-security-headers

Adds security related headers to HTTP response.

v2.0.0 2023-03-04 09:50 UTC

This package is auto-updated.

Last update: 2024-11-04 13:40:07 UTC


README

Security related headers to HTTP responses in Laravel

Software License Packagist Packagist Downloads

Installation

Install using composer

composer require sloyakuza/laravel-security-headers

Add service provider in config/app.php ( laravel version < 5.5 )

SLOYakuza\SecureHeaders\SecureHeadersServiceProvider::class,

Publish config file

php artisan vendor:publish --provider="SLOYakuza\SecureHeaders\SecureHeadersServiceProvider"

Add global middleware in app/Http/Kernel.php

\SLOYakuza\SecureHeaders\SecureHeadersMiddleware::class,

Set up config file config/secure-headers.php

Done!