mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Used middleware from library to actually find visitor IP addresses
This commit is contained in:
@@ -29,8 +29,11 @@ class IpAddressMiddlewareFactoryTest extends TestCase
|
||||
$checkProxyHeaders->setAccessible(true);
|
||||
$trustedProxies = $ref->getProperty('trustedProxies');
|
||||
$trustedProxies->setAccessible(true);
|
||||
$attributeName = $ref->getProperty('attributeName');
|
||||
$attributeName->setAccessible(true);
|
||||
|
||||
$this->assertTrue($checkProxyHeaders->getValue($instance));
|
||||
$this->assertEquals([], $trustedProxies->getValue($instance));
|
||||
$this->assertEquals(IpAddressMiddlewareFactory::REMOTE_ADDRESS, $attributeName->getValue($instance));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user