Trusted proxy to version 4.0 for laravel 5.6

This commit is contained in:
Chris Fidao 2017-12-19 06:48:46 -06:00
parent f1575bf27c
commit 6779a2759e
2 changed files with 3 additions and 9 deletions

View File

@ -15,15 +15,9 @@ class TrustProxies extends Middleware
protected $proxies;
/**
* The current proxy header mappings.
* The headers used to detect proxies.
*
* @var array
*/
protected $headers = [
Request::HEADER_FORWARDED => 'FORWARDED',
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
protected $headers = Request::HEADER_X_FORWARDED_FOR;
}

View File

@ -6,7 +6,7 @@
"type": "project",
"require": {
"php": ">=7.1.0",
"fideloper/proxy": "~3.3",
"fideloper/proxy": "~4.0",
"laravel/framework": "5.6.*",
"laravel/tinker": "~1.0"
},