mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +00:00
Don't always explode the TRUST_PROXIES variable
This commit is contained in:
parent
0adf959a74
commit
cb6e8a4eaa
1 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$proxyString = env('TRUST_PROXIES', '');
|
||||||
|
|
||||||
|
if ($proxyString == '*' || $proxyString == '**') {
|
||||||
|
$proxies = $proxyString;
|
||||||
|
} else {
|
||||||
|
$proxies = explode(',', $proxyString);
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
/*
|
/*
|
||||||
* Set trusted proxy IP addresses.
|
* Set trusted proxy IP addresses.
|
||||||
|
@ -23,5 +31,5 @@ return [
|
||||||
* how many proxies that client's request has
|
* how many proxies that client's request has
|
||||||
* subsequently passed through.
|
* subsequently passed through.
|
||||||
*/
|
*/
|
||||||
'proxies' => explode(',', env('TRUST_PROXIES', '')),
|
'proxies' => $proxies,
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue