Skip to content

Update to URL.hostname as returns port as well if present in URL

In RequestAnalyzer, I noticed new URL(url).host was used. Updated it to new URL(url).hostname in this Pull Request.

Reason: new URL(url).host can return "hostname:port" if port is present in URL, then it would not match with the mappings object map. new URL(url).hostname will always return just hostname without the port.

Example: -> host will return but hostname returns just

Edited by Gokulakrishna

Merge request reports