njxqlus/laravel-valid-proxies
Laravel Valid Proxies
Fix SSL in Laravel 5 when server is behind a load balancer or a reverse proxy
Installation
Install via composer composer require njxqlus/laravel-valid-proxies
For Laravel 5.4 you need to add Service Provider in your config/app.php file:
njxqlus\LaravelValidProxies\ServiceProvider::class
Usage
ValidProxies Middleware already pushed to web middleware group.
If you want to use middleware global - add to to app\Http\Kernel in $middleware array:
\njxqlus\LaravelValidProxies\Middleware\ValidProxies::class
Credits
Related Packages
A package for automatically encrypting and decrypting Eloquent attributes in Lar...
A package for automatically encrypting and decrypting Eloquent attributes in Lar...
A ServiceProvider for setting trusted proxies in Laravel applications
Add Cloudflare ip addresses to trusted proxies for Laravel.