We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02bfa78 commit 2daa64dCopy full SHA for 2daa64d
src/Controller.php
@@ -70,7 +70,7 @@ public function rollbackTransaction(): bool {
70
}
71
public function getClientIp(): string {
72
if (isset($this->swoole_http_request->header['x-forwarded-for'])) {
73
- return current(explode(', ', $this->swoole_http_request->header['x-forwarded-for']));
+ return trim(current(explode(',', $this->swoole_http_request->header['x-forwarded-for'])));
74
75
return $this->swoole_http_request->server['remote_addr'];
76
0 commit comments