Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Patch express req.host to include port number #1222

Merged
merged 3 commits into from
Jan 16, 2019

Conversation

threehams
Copy link
Collaborator

Express has a long-standing bug in v4 where the port number is dropped from host, which is why req.host is marked as deprecated. In v5, req.host is fixed and req.hostname does not include the port.

For now, we're using middleware to patch req.host to include the port number, which is correct behavior.

@threehams
Copy link
Collaborator Author

Approving on behalf of @christinebrass who wrote the code (I'm just opening the PR).

@threehams threehams merged commit 2b5294f into develop Jan 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants