2021-02-14 10:55:04 +01:00
|
|
|
<?php
|
|
|
|
|
2022-06-21 11:58:36 +02:00
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
2021-02-14 10:55:04 +01:00
|
|
|
return [
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set trusted proxy IP addresses.
|
|
|
|
*
|
|
|
|
* Both IPv4 and IPv6 addresses are
|
|
|
|
* supported, along with CIDR notation.
|
|
|
|
*
|
|
|
|
* The "*" character is syntactic sugar
|
|
|
|
* within TrustedProxy to trust any proxy
|
|
|
|
* that connects directly to your server,
|
|
|
|
* a requirement when you cannot know the address
|
|
|
|
* of your proxy (e.g. if using ELB or similar).
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
'proxies' => null, // [<ip addresses>,], '*', '<ip addresses>,'
|
|
|
|
|
|
|
|
/*
|
|
|
|
* To trust one or more specific proxies that connect
|
|
|
|
* directly to your server, use an array or a string separated by comma of IP addresses:
|
|
|
|
*/
|
|
|
|
// 'proxies' => ['192.168.1.1'],
|
|
|
|
// 'proxies' => '192.168.1.1, 192.168.1.2',
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Or, to trust all proxies that connect
|
|
|
|
* directly to your server, use a "*"
|
|
|
|
*/
|
|
|
|
// 'proxies' => '*',
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Which headers to use to detect proxy related data (For, Host, Proto, Port)
|
|
|
|
*
|
|
|
|
* Options include:
|
|
|
|
*
|
2022-06-21 11:58:36 +02:00
|
|
|
* - Illuminate\Http\Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB (use all x-forwarded-* headers to establish trust)
|
2021-02-14 10:55:04 +01:00
|
|
|
* - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust)
|
|
|
|
* - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer)
|
|
|
|
*
|
|
|
|
* - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust)
|
|
|
|
* - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust)
|
|
|
|
* - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer)
|
|
|
|
*
|
|
|
|
* @link https://symfony.com/doc/current/deployment/proxies.html
|
|
|
|
*/
|
2022-06-21 11:58:36 +02:00
|
|
|
'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB,
|
2021-02-14 10:55:04 +01:00
|
|
|
|
|
|
|
];
|