PHPackages                             acolyte/laravel-security - 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. [Security](/categories/security)
4. /
5. acolyte/laravel-security

ActivePackage[Security](/categories/security)

acolyte/laravel-security
========================

laravel-security helps you secure your Laravel apps by setting various HTTP headers. it can help!

1.0.0(3y ago)279MITPHP

Since Feb 10Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

🔐 Laravel-Security
==================

[](#-laravel-security)

[![Packagist Downloads](https://camo.githubusercontent.com/8114533f2a80a7338f1ee03cfa89f550e95a38f4ce39eef3767eb4b927408a43/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61636f6c7974652f6c61726176656c2d73656375726974793f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/8114533f2a80a7338f1ee03cfa89f550e95a38f4ce39eef3767eb4b927408a43/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61636f6c7974652f6c61726176656c2d73656375726974793f7374796c653d666f722d7468652d6261646765)[![GitHub repo size](https://camo.githubusercontent.com/5991798323415c052e1f439c96e1272ccf1e6cfd009667f9209d0bd84b387dff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f69616c616d696e70726f2f6c61726176656c2d73656375726974793f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/5991798323415c052e1f439c96e1272ccf1e6cfd009667f9209d0bd84b387dff/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f69616c616d696e70726f2f6c61726176656c2d73656375726974793f7374796c653d666f722d7468652d6261646765)[![GitHub](https://camo.githubusercontent.com/68d71875558d8760e002040b615466c732a19f1fb9a2b50934687d854ba8bd1b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616c616d696e70726f2f6c61726176656c2d73656375726974793f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/68d71875558d8760e002040b615466c732a19f1fb9a2b50934687d854ba8bd1b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616c616d696e70726f2f6c61726176656c2d73656375726974793f7374796c653d666f722d7468652d6261646765)

Laravel-Security helps you secure your Laravel apps by setting various HTTP headers. It's not a silver bullet, but it can help!

Quick start
-----------

[](#quick-start)

First, You can install the package via composer:

```
composer require acolyte/laravel-security
```

If you would like to assign middleware to specific routes, you should first assign the middleware a key in your `app/Http/Kernel.php` file. By default, the `$routeMiddleware` property of this class contains entries for the middleware included with Laravel

```
// Within App\Http\Kernel Class...

protected $routeMiddleware = [
    'auth' => \App\Http\Middleware\Authenticate::class,
    'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
    'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
    'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
    'can' => \Illuminate\Auth\Middleware\Authorize::class,
    'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
    'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
    'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
    'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
    'no-cache' => \Acolyte\LaravelSecurity\Middleware\CacheMiddleware::class
];
```

Documentation
-------------

[](#documentation)

For installation instructions, in-depth usage and deployment details, please take a look at the official [documentation](https://getspooky.github.io/Laravel-Acolyte/).

Requirements
------------

[](#requirements)

Laravel-Security has a few requirements you should be aware of before installing :

- Composer
- Laravel Framework 5.4+

Solved : Security vulnerability
-------------------------------

[](#solved--security-vulnerability)

Laravel-Security is a collection of 9 smaller middleware functions that set HTTP response headers.

VulnerabilityMiddleware ClassIncludedCache Control AttackAcolyte\\LaravelSecurity\\Middleware\\CacheMiddleware::class✔Cross-Origin Resource Sharing (CORS)Acolyte\\LaravelSecurity\\Middleware\\CorsMiddleware::class✔X-Permitted-Cross-Domain-PoliciesAcolyte\\LaravelSecurity\\Middleware\\CrossDomainMiddleware::class✔DNS Prefetch Control Acolyte\\LaravelSecurity\\Middleware\\DnsMiddleware::class✔Click Jacking AttackAcolyte\\LaravelSecurity\\Middleware\\FrameGuardMiddleware::class✔Strict-Transport-Security Acolyte\\LaravelSecurity\\Middleware\\HstsMiddleware::class✔Mime Sniffing AttackAcolyte\\LaravelSecurity\\Middleware\\NoSniffMiddleware::class✔X-Powered-By AttackAcolyte\\LaravelSecurity\\Middleware\\XPoweredByMiddleware::class✔ XSS Attack Acolyte\\LaravelSecurity\\Middleware\\XssMiddleware::class✔Contributing
------------

[](#contributing)

Whether you're helping us fix bugs, improve the docs, or spread the word, we'd love to have you as part of the `Laravel-Security` community! 💪💜 See CONTRIBUTING.md for more information on what we're looking for and how to get started.

License
-------

[](#license)

The Laravel-Security package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

1192d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e80efbbbcd8cec4e530404a65f1e21a2cd41ecd35dd3ba75580c57ab0c5a586a?d=identicon)[ialamin.pro](/maintainers/ialamin.pro)

---

Top Contributors

[![ialaminpro](https://avatars.githubusercontent.com/u/11612614?v=4)](https://github.com/ialaminpro "ialaminpro (3 commits)")

---

Tags

laravelsecuritycorsdnsxssno-cacheattackvulnerabilityclickjackingx-powered-bynoSniff

### Embed Badge

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

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

###  Alternatives

[mitnick/laravel-security

laravel-mitnick helps you secure your Laravel apps by setting various HTTP headers. it can help!

8111.7k1](/packages/mitnick-laravel-security)[akaunting/laravel-firewall

Web Application Firewall (WAF) package for Laravel

999465.8k2](/packages/akaunting-laravel-firewall)

PHPackages © 2026

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