From 1ff239df800f03190629dda557d76a1d7c3e77b1 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com> Date: Tue, 26 Oct 2021 17:11:40 -0400 Subject: [PATCH] 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. --- framework/core/src/Api/Client.php | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/core/src/Api/Client.php b/framework/core/src/Api/Client.php index 237c03b91..457ec41ac 100644 --- a/framework/core/src/Api/Client.php +++ b/framework/core/src/Api/Client.php @@ -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)); }