Looking to hire Laravel developers? Try LaraJobs

laravel-security-headers maintained by hdvinnie

Description
Adds security related headers to HTTP response.
Author
Last update
2025/07/20 01:38 (dev-main)
License
Downloads
70 975

Comments
comments powered by Disqus

laravel-security-headers

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!