@@ -27,7 +27,7 @@ test('X-Forwarded headers handling with proxy', function () {
2727
2828 $ factory ->setProxy ('127.0.0.1/8 ' );
2929 Assert::same ('23.75.45.200 ' , $ factory ->fromGlobals ()->getRemoteAddress ());
30- Assert::same ( ' a23-75-45-200.deploy.static.akamaitechnologies.com ' , $ factory ->fromGlobals ()->getRemoteHost ());
30+ Assert::null ( $ factory ->fromGlobals ()->getRemoteHost ());
3131
3232 $ url = $ factory ->fromGlobals ()->getUrl ();
3333 Assert::same ('otherhost ' , $ url ->getHost ());
@@ -45,7 +45,7 @@ test('X-Forwarded-Host with port', function () {
4545 $ factory = new RequestFactory ;
4646 $ factory ->setProxy ('127.0.0.3 ' );
4747 Assert::same ('23.75.45.200 ' , $ factory ->fromGlobals ()->getRemoteAddress ());
48- Assert::same ( ' a23-75-45-200.deploy.static.akamaitechnologies.com ' , $ factory ->fromGlobals ()->getRemoteHost ());
48+ Assert::null ( $ factory ->fromGlobals ()->getRemoteHost ());
4949
5050 $ url = $ factory ->fromGlobals ()->getUrl ();
5151 Assert::same ('otherhost ' , $ url ->getHost ());
@@ -81,15 +81,15 @@ test('multiple proxies in X-Forwarded headers', function () {
8181 $ factory = new RequestFactory ;
8282 $ factory ->setProxy ('10.0.0.0/24 ' );
8383 Assert::same ('172.16.0.1 ' , $ factory ->fromGlobals ()->getRemoteAddress ());
84- Assert::same ( ' 172.16.0.1 ' , $ factory ->fromGlobals ()->getRemoteHost ());
84+ Assert::null ( $ factory ->fromGlobals ()->getRemoteHost ());
8585
8686 $ url = $ factory ->fromGlobals ()->getUrl ();
8787 Assert::same ('real ' , $ url ->getHost ());
8888 Assert::same (80 , $ url ->getPort ());
8989
9090 $ factory ->setProxy (['10.0.0.1 ' , '10.0.0.2 ' ]);
9191 Assert::same ('172.16.0.1 ' , $ factory ->fromGlobals ()->getRemoteAddress ());
92- Assert::same ( ' 172.16.0.1 ' , $ factory ->fromGlobals ()->getRemoteHost ());
92+ Assert::null ( $ factory ->fromGlobals ()->getRemoteHost ());
9393
9494 $ url = $ factory ->fromGlobals ()->getUrl ();
9595 Assert::same ('real ' , $ url ->getHost ());
@@ -107,7 +107,7 @@ test('X-Forwarded-Host with multiple entries and port', function () {
107107 $ factory = new RequestFactory ;
108108 $ factory ->setProxy (['10.0.0.1 ' , '10.0.0.2 ' ]);
109109 Assert::same ('172.16.0.1 ' , $ factory ->fromGlobals ()->getRemoteAddress ());
110- Assert::same ( ' 172.16.0.1 ' , $ factory ->fromGlobals ()->getRemoteHost ());
110+ Assert::null ( $ factory ->fromGlobals ()->getRemoteHost ());
111111
112112 $ url = $ factory ->fromGlobals ()->getUrl ();
113113 Assert::same ('real ' , $ url ->getHost ());
0 commit comments