Include hostName:$port for Host access violation message as well

Signed-off-by: Robin Kluth <Commifreak@users.noreply.github.com>
This commit is contained in:
Robin Kluth 2024-02-19 14:26:42 +01:00 committed by John Molakvoæ
parent 25c0021137
commit 414f8f1f2d

View file

@ -147,7 +147,7 @@ class DnsPinMiddleware {
foreach ($targetIps as $ip) {
if ($this->ipAddressClassifier->isLocalAddress($ip)) {
// TODO: continue with all non-local IPs?
throw new LocalServerException('Host "'.$ip.'" violates local access rules');
throw new LocalServerException('Host "'.$ip.'" ('.$hostName.':'.$port.') violates local access rules');
}
$curlResolves["$hostName:$port"][] = $ip;
}