mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 23:42:58 +08:00
Pass IP address to API Client pipeline (#3124)
The `ProcessIp` middleware won't run twice as that's in the global middleware stack, which the API client doesn't go through.
This commit is contained in:
parent
61b3539271
commit
1ff239df80
|
@ -132,6 +132,7 @@ class Client
|
||||||
|
|
||||||
if ($this->parent) {
|
if ($this->parent) {
|
||||||
$request = $request
|
$request = $request
|
||||||
|
->withAttribute('ipAddress', $this->parent->getAttribute('ipAddress'))
|
||||||
->withAttribute('session', $this->parent->getAttribute('session'));
|
->withAttribute('session', $this->parent->getAttribute('session'));
|
||||||
$request = RequestUtil::withActor($request, RequestUtil::getActor($this->parent));
|
$request = RequestUtil::withActor($request, RequestUtil::getActor($this->parent));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user