Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/config/trustedproxy.php
7382 views
1
<?php
2
3
return [
4
/*
5
* Set trusted proxy IP addresses.
6
*
7
* Both IPv4 and IPv6 addresses are
8
* supported, along with CIDR notation.
9
*
10
* The "*" character is syntactic sugar
11
* within TrustedProxy to trust any proxy
12
* that connects directly to your server,
13
* a requirement when you cannot know the address
14
* of your proxy (e.g. if using Rackspace balancers).
15
*
16
* The "**" character is syntactic sugar within
17
* TrustedProxy to trust not just any proxy that
18
* connects directly to your server, but also
19
* proxies that connect to those proxies, and all
20
* the way back until you reach the original source
21
* IP. It will mean that $request->getClientIp()
22
* always gets the originating client IP, no matter
23
* how many proxies that client's request has
24
* subsequently passed through.
25
*/
26
'proxies' => in_array(env('TRUSTED_PROXIES', []), ['*', '**']) ?
27
env('TRUSTED_PROXIES') : explode(',', env('TRUSTED_PROXIES') ?? ''),
28
];
29
30