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:
Alexander Skvortsov 2021-10-26 17:11:40 -04:00 committed by GitHub
parent 972411673f
commit f7a78d85e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,6 +132,7 @@ class Client
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));
}