PHPackages                             hdvinnie/laravel-security-headers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. hdvinnie/laravel-security-headers

ActiveLibrary[HTTP &amp; Networking](/categories/http)

hdvinnie/laravel-security-headers
=================================

Adds security related headers to HTTP response.

v3.0.3(10mo ago)169.5k↓31.8%MITPHPPHP ^7.4|^8.0

Since Feb 9Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/HDVinnie/laravel-security-headers)[ Packagist](https://packagist.org/packages/hdvinnie/laravel-security-headers)[ Docs](https://github.com/HDVinnie/laravel-security-headers)[ RSS](/packages/hdvinnie-laravel-security-headers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (8)Used By (0)

laravel-security-headers
========================

[](#laravel-security-headers)

Security related headers to HTTP responses in Laravel

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist](https://camo.githubusercontent.com/6dc40cfe857bf4f4d6f76430c388a26e5e6675426f1c6d8198fa9924233bd93f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f686476696e6e69652f6c61726176656c2d73656375726974792d68656164657273)](https://packagist.org/packages/hdvinnie/laravel-security-headers/)[![Packagist Downloads](https://camo.githubusercontent.com/e2eb9ec1fda78aced491a971954208daf5a39f115c8fb928a1c52bb12482dc21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f686476696e6e69652f6c61726176656c2d73656375726974792d686561646572732e7376673f6c6162656c3d7061636b6167697374253230646f776e6c6f616473)](https://packagist.org/packages/hdvinnie/laravel-security-headers)

Installation
------------

[](#installation)

Install using composer

```
composer require hdvinnie/laravel-security-headers
```

Add service provider in `config/app.php` ( laravel version &lt; 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!

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance55

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~209 days

Recently: every ~221 days

Total

7

Last Release

303d ago

Major Versions

v1.0.1 → v2.0.02023-02-15

v2.0.0 → v3.0.02024-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad4ed27be5eced22f5a4f11db53d67bf16a7a9c6229d5857d5bd4cca84fbc3a0?d=identicon)[HDVinnie](/maintainers/HDVinnie)

---

Top Contributors

[![HDVinnie](https://avatars.githubusercontent.com/u/12850699?v=4)](https://github.com/HDVinnie "HDVinnie (13 commits)")

---

Tags

laravelhttpslaravelheadercspcontent-security-policyhstsexcept-ctfeature-policyclear-site-datareferrer-policyHDVinnie

### Embed Badge

![Health badge](/badges/hdvinnie-laravel-security-headers/health.svg)

```
[![Health](https://phpackages.com/badges/hdvinnie-laravel-security-headers/health.svg)](https://phpackages.com/packages/hdvinnie-laravel-security-headers)
```

###  Alternatives

[bepsvpt/secure-headers

Add security related headers to HTTP response. The package includes Service Providers for easy Laravel integration.

5484.7M9](/packages/bepsvpt-secure-headers)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)[akhan619/laravel-ses-tracking

A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.

149.9k](/packages/akhan619-laravel-ses-tracking)[akhan619/laravel-ses-event-manager

A Laravel package to manage incoming SES email events with http/s webhooks.

148.8k](/packages/akhan619-laravel-ses-event-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
