Skip to content
Snippets Groups Projects

Ignore port numbers when extracting domain names

Closed Gokulakrishna requested to merge gkrishnaks/decentraleyes:Update_to_URL.Hostname into master

Hi,
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: https://b.somecdn.com:443/path/ -> host will return b.somecdn.com:443 but hostname returns just b.somecdn.com

Edited by Thomas Rientjes

Merge request reports

Approval is optional

Closed by Thomas RientjesThomas Rientjes 1 month ago (Dec 2, 2024 7:51pm UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading