hdvinnie/laravel-security-headers

Adds security related headers to HTTP response.

v3.0.0 2024-03-13 15:44 UTC

This package is auto-updated.

Last update: 2024-11-13 17:13:14 UTC


README

Security related headers to HTTP responses in Laravel

Software License Packagist Packagist Downloads

Installation

Install using composer

composer require hdvinnie/laravel-security-headers

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

HDVinnie\SecureHeaders\SecureHeadersServiceProvider::class,

Publish config file

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

Add global middleware in app/Http/Kernel.php

\HDVinnie\SecureHeaders\SecureHeadersMiddleware::class,

Set up config file config/secure-headers.php

Done!