Skip to content

Instantly share code, notes, and snippets.

@morrislaptop
Created November 25, 2019 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morrislaptop/f12cc86b8a6dea4fca23787f79c95918 to your computer and use it in GitHub Desktop.
Save morrislaptop/f12cc86b8a6dea4fca23787f79c95918 to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Middleware;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array|string
*/
protected $proxies = '*';
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_AWS_ELB;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment