We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f04c67d commit a47e45eCopy full SHA for a47e45e
1 file changed
system/HTTP/RequestTrait.php
@@ -64,13 +64,11 @@ public function getIPAddress(): string
64
*/
65
// @phpstan-ignore-next-line
66
$proxyIPs = $this->proxyIPs ?? config('App')->proxyIPs;
67
- if (! empty($proxyIPs)) {
68
- // @phpstan-ignore-next-line
69
- if (! is_array($proxyIPs) || is_int(array_key_first($proxyIPs))) {
70
- throw new ConfigException(
71
- 'You must set an array with Proxy IP address key and HTTP header name value in Config\App::$proxyIPs.'
72
- );
73
- }
+ // @phpstan-ignore-next-line
+ if (! empty($proxyIPs) && (! is_array($proxyIPs) || is_int(array_key_first($proxyIPs)))) {
+ throw new ConfigException(
+ 'You must set an array with Proxy IP address key and HTTP header name value in Config\App::$proxyIPs.'
+ );
74
}
75
76
$this->ipAddress = $this->getServer('REMOTE_ADDR');
0 commit comments