Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • decentraleyes decentraleyes
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 83
    • Issues 83
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

To participate, please register, or sign in using an existing GitLab.com, Bitbucket, or GitHub account.

  • Thomas Rientjes
  • decentraleyesdecentraleyes
  • Merge requests
  • !292

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

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Gokulakrishna requested to merge gkrishnaks/decentraleyes:Update_to_URL.Hostname into master Mar 18, 2019
  • Overview 0
  • Commits 2
  • Changes 2

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 Mar 18, 2019 by Gokulakrishna
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: Update_to_URL.Hostname