How to set Set trusted proxies for Laravel

Laravel 5 has a much nicer system for Middleware, which this package now takes advantage of.

New features include:

  1. TrustedProxies are now set as in an HTTP Middleware, which makes more logical sense than the previous ServiceProvider. If you’re unsure what that means, remember to “Just Trust Fideloper™”.
  2. You can now set the trusted header names. This is useful for proxies that don’t use the usual X-Forwarded-* headers.

To use this with Laravel 5, run the following from your Laravel 5 project directory:

composer require fideloper/proxy:~3.0

Or of course, you can edit your composer.json file directly:

    "require": {
        "fideloper/proxy": "~3.0"
prevChapter 1 of 8

Recommended :  Dealing with files & uploads in laravel

About the author

Deven Rathore

I'm Deven Rathore, a multidisciplinary & self-taught designer with 3 years of experience. I'm passionate about technology, music, coffee, traveling and everything visually stimulating. Constantly learning and experiencing new things.

Pin It on Pinterest