PHPackages                             sloyakuza/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. sloyakuza/laravel-security-headers

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

sloyakuza/laravel-security-headers
==================================

Adds security related headers to HTTP response.

v2.0.0(3y ago)013.4k↓47.7%1[1 PRs](https://github.com/SLOYakuza/laravel-security-headers/pulls)MITPHPPHP ^7.4|^8.0

Since Mar 26Pushed 3y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (5)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/2ca758705d1ac1b64c3a418d124540d2822f1b9b94d105f4eee3def7631ed3b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736c6f79616b757a612f6c61726176656c2d73656375726974792d68656164657273)](https://packagist.org/packages/sloyakuza/laravel-security-headers/)[![Packagist Downloads](https://camo.githubusercontent.com/17786deabd5f01e754bbcdfcc1d195cfd396743f0f40e521d6e256cdb230a3e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f736c6f79616b757a612f6c61726176656c2d73656375726974792d686561646572732e7376673f6c6162656c3d7061636b6167697374253230646f776e6c6f616473)](https://packagist.org/packages/sloyakuza/laravel-security-headers)

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

[](#installation)

Install using composer

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

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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 ~171 days

Total

3

Last Release

1172d ago

Major Versions

v1.0.1 → v2.0.02023-03-04

### Community

Maintainers

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

---

Top Contributors

[![SLOYakuza](https://avatars.githubusercontent.com/u/8770361?v=4)](https://github.com/SLOYakuza "SLOYakuza (2 commits)")

---

Tags

httpslaravelheadercspcontent-security-policyhstsexcept-ctfeature-policyclear-site-datareferrer-policySLOYakuza

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/sloyakuza-laravel-security-headers/health.svg)](https://phpackages.com/packages/sloyakuza-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)
