File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,15 +110,15 @@ public function addDnsPinning() {
110110 }
111111
112112 $ hostName = (string )$ request ->getUri ()->getHost ();
113- $ port = $ request ->getUri ()->getPort ();
113+ $ requestPort = $ request ->getUri ()->getPort ();
114114
115115 $ ports = [
116116 '80 ' ,
117117 '443 ' ,
118118 ];
119119
120- if ($ port !== null ) {
121- $ ports [] = (string )$ port ;
120+ if ($ requestPort !== null ) {
121+ $ ports [] = (string )$ requestPort ;
122122 }
123123
124124 $ targetIps = $ this ->dnsResolve (idn_to_utf8 ($ hostName ), 0 );
@@ -135,7 +135,8 @@ public function addDnsPinning() {
135135 foreach ($ targetIps as $ ip ) {
136136 if ($ this ->ipAddressClassifier ->isLocalAddress ($ ip )) {
137137 // TODO: continue with all non-local IPs?
138- throw new LocalServerException ('Host " ' . $ ip . '" ( ' . $ hostName . ') violates local access rules ' );
138+ // log requestPort because that's more relevant to the admin
139+ throw new LocalServerException ('Host " ' . $ ip . '" ( ' . $ hostName . ': ' . $ requestPort . ') violates local access rules ' );
139140 }
140141 $ curlResolves ["$ hostName: $ port " ][] = $ ip ;
141142 }
You can’t perform that action at this time.
0 commit comments