Skip to content

Commit 53e6ba6

Browse files
committed
fixup tests
1 parent 091dea8 commit 53e6ba6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/EventSubscriber/Challenge.php

+7-4
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,13 @@ protected function applies(RequestEvent $event, ImmutableConfig $config): bool {
112112
return FALSE;
113113
}
114114

115-
$hostname = self::getHostname($clientIp, $hostname);
116-
// Need at least a second level domain.
117-
if (strpos($hostname, ".") === FALSE) {
118-
return TRUE;
115+
$hostname = "localhost.localdomain";
116+
if ($clientIp !== '127.0.0.1') {
117+
$hostname = self::getHostname($clientIp, $hostname);
118+
// Need at least a second level domain.
119+
if (strpos($hostname, ".") === FALSE) {
120+
return TRUE;
121+
}
119122
}
120123

121124
$parts = explode(".", $hostname);

0 commit comments

Comments
 (0)