Looking to hire Laravel developers? Try LaraJobs
This package is not available.

laravel-ip-restrictions maintained by rabianr

Description
Ip restrictions Middleware for Laravel
Author
ラ・ビ・アン・ローズ
Last update
2022/01/31 08:55 (dev-master)
License
Links
Downloads
12

Comments
comments powered by Disqus

Ip restrictions Middleware for Laravel

Installation

composer require rabianr/laravel-ip-restrictions

Configuration

Publish the config to copy the file to your own config:

php artisan vendor:publish --tag="iprestrictions"

Usage

Set iprestrictions middleware to any route that require Basic Auth.

Define ip addresses in config/iprestrictions.php config file.

'whitelist' => array_merge([
    '1.1.1.1',
], array_filter(explode(',', env('IPRESTRICTIONS_WHITELIST', '')))),

or in .env file

IPRESTRICTIONS_WHITELIST=1.1.1.1,1.1.1.2