From d228c16f8260d8d93535cccae212b640b4fba720 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Fri, 20 Dec 2024 09:52:30 +0100 Subject: [PATCH] Fix test for ip middleware --- composer.json | 2 +- module/Core/test-api/Action/RedirectTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index aa1a1e52..ca6cab07 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "ext-json": "*", "ext-mbstring": "*", "ext-pdo": "*", - "akrabat/ip-address-middleware": "^2.4", + "akrabat/ip-address-middleware": "^2.5", "cakephp/chronos": "^3.1", "doctrine/dbal": "^4.2", "doctrine/migrations": "^3.8", diff --git a/module/Core/test-api/Action/RedirectTest.php b/module/Core/test-api/Action/RedirectTest.php index 79a13fbf..2cfe9417 100644 --- a/module/Core/test-api/Action/RedirectTest.php +++ b/module/Core/test-api/Action/RedirectTest.php @@ -93,7 +93,7 @@ class RedirectTest extends ApiTestCase foreach ($ipAddressConfig['rka']['ip_address']['headers_to_inspect'] as $header) { yield sprintf('rule: IP address in "%s" header', $header) => [ [ - RequestOptions::HEADERS => [$header => '1.2.3.4'], + RequestOptions::HEADERS => [$header => $header !== 'Forwarded' ? '1.2.3.4' : 'for=1.2.3.4'], ], 'https://example.com/static-ip-address', ];