Fix test for ip middleware

This commit is contained in:
Alejandro Celaya
2024-12-20 09:52:30 +01:00
parent c34bfac6b1
commit d228c16f82
2 changed files with 2 additions and 2 deletions

View File

@@ -18,7 +18,7 @@
"ext-json": "*", "ext-json": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-pdo": "*", "ext-pdo": "*",
"akrabat/ip-address-middleware": "^2.4", "akrabat/ip-address-middleware": "^2.5",
"cakephp/chronos": "^3.1", "cakephp/chronos": "^3.1",
"doctrine/dbal": "^4.2", "doctrine/dbal": "^4.2",
"doctrine/migrations": "^3.8", "doctrine/migrations": "^3.8",

View File

@@ -93,7 +93,7 @@ class RedirectTest extends ApiTestCase
foreach ($ipAddressConfig['rka']['ip_address']['headers_to_inspect'] as $header) { foreach ($ipAddressConfig['rka']['ip_address']['headers_to_inspect'] as $header) {
yield sprintf('rule: IP address in "%s" header', $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', 'https://example.com/static-ip-address',
]; ];