Skip to content

Refactor X-Forwarded-Host value extraction - #7047

Closed
ProxyLoader wants to merge 1 commit into
expressjs:masterfrom
ProxyLoader:patch-1
Closed

ProxyLoader wants to merge 1 commit into
expressjs:masterfrom
ProxyLoader:patch-1

Conversation

@ProxyLoader

Copy link
Copy Markdown

.trimRight() is deprecated in modern ECMAScript, it does work, but trimEnd() is the modern way to do it

@themavik themavik left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split(",", 1)[0] plus trimEnd() keeps the first X-Forwarded-Host segment equivalent to the old substring/trimRight path. nit: worth matching trimEnd to whatever Node baseline Express documents for this line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants