mitnick/laravel-security

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

This package's canonical repository appears to be gone and the package has been frozen as a result.

Installs: 11 377

Dependents: 1

Suggesters: 0

Security: 0

Stars: 81

Watchers: 7

Forks: 12

Type:package

1.0.0 2020-07-13 23:27 UTC

This package is auto-updated.

Last update: 2025-02-20 04:30:22 UTC


README

Packagist Downloads GitHub repo size GitHub

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

Quick start

First, You can install the package via composer:

composer require mitnick/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' => \Mitnick\Laravel\Security\cache::class
];

Documentation

For installation instructions, in-depth usage and deployment details, please take a look at the official documentation.

Requirements

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

  • Composer
  • Laravel Framework 5.4+

Solved : Security vulnerability

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

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-Mitnick community! 💪💜 See CONTRIBUTING.md for more information on what we're looking for and how to get started.

License

The Laravel-Mitnick package is open-source software licensed under the MIT license.