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"