LaravelPackages.net
Acme Inc.
Toggle sidebar
bluenest/laravel-ip-restriction-middleware

Laravel middleware to allow restricting HTTP requests by IP addresses.

42
0
About bluenest/laravel-ip-restriction-middleware

bluenest/laravel-ip-restriction-middleware is a Laravel package for laravel middleware to allow restricting http requests by ip addresses.. It currently has 0 GitHub stars and 42 downloads on Packagist. Install it with composer require bluenest/laravel-ip-restriction-middleware. Discover more Laravel packages by bluenest or browse all Laravel packages to compare alternatives.

Last updated

bluenest/laravel-ip-restriction-middleware

Laravel middleware for restricting HTTP access by IP address or addresses.

Installation

Add via composer:

composer require bluenest/laravel-ip-restriction-middleware

Then add the following middleware in app/Http/kernel.php:

\BlueNest\Laravel\Http\Middleware\IpRestrictionMiddleware::class,

Configuration

Add the following configuration settings in your .env file:

IP_ACCESS_ALLOW_DENY_DEFAULT=DENY
IP_ACCESS_BLACKLIST=
IP_ACCESS_WHITELIST=127.0.0.1
IP_ACCESS_DENY_MESSAGE="Please contact an administrator"
IP_ACCESS_DENY_HTTP_STATUS_CODE=500
IP_ACCESS_LOG_DENIALS=true
Comments