Skip to content

Commit

Permalink
Pass IP address to API Client pipeline (#3124)
Browse files Browse the repository at this point in the history
The `ProcessIp` middleware won't run twice as that's in the global middleware stack, which the API client doesn't go through.
  • Loading branch information
askvortsov1 authored Oct 26, 2021
1 parent 9724116 commit f7a78d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Api/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ public function send(string $method, string $path): ResponseInterface

if ($this->parent) {
$request = $request
->withAttribute('ipAddress', $this->parent->getAttribute('ipAddress'))
->withAttribute('session', $this->parent->getAttribute('session'));
$request = RequestUtil::withActor($request, RequestUtil::getActor($this->parent));
}
Expand Down

0 comments on commit f7a78d8

Please sign in to comment.