docs: add deprecation note for 'back' redirect in res-redirect.md and res-location.md v4#1835
Merged
carlosstenzel merged 2 commits intogh-pagesfrom Mar 21, 2025
Merged
docs: add deprecation note for 'back' redirect in res-redirect.md and res-location.md v4#1835carlosstenzel merged 2 commits intogh-pagesfrom
carlosstenzel merged 2 commits intogh-pagesfrom
Conversation
✅ Deploy Preview for expressjscom-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
bjohansebas
commented
Mar 15, 2025
Comment on lines
-48
to
-54
| A `back` redirection redirects the request back to the [referer](http://en.wikipedia.org/wiki/HTTP_referer), | ||
| defaulting to `/` when the referer is missing. | ||
|
|
||
| ```js | ||
| res.redirect('back') | ||
| ``` | ||
|
|
Member
Author
There was a problem hiding this comment.
I'm not sure about removing this, maybe the recommended option should be mentioned req.get('Referrer') || '/'
Member
There was a problem hiding this comment.
Similar to 5x migration guide
carlosstenzel
approved these changes
Mar 18, 2025
krzysdz
reviewed
Apr 24, 2025
Comment on lines
-13
to
-15
| See also [Security best practices: Prevent open redirect | ||
| vulnerabilities](http://expressjs.com/en/advanced/best-practice-security.html#prevent-open-redirects). | ||
|
|
Contributor
There was a problem hiding this comment.
Is there a reason why this note was removed here?
Member
Author
There was a problem hiding this comment.
we can keep it—there's no reason to remove it. Also, we still need to add the reference to the new recommended option (see https://github.com/expressjs/expressjs.com/pull/1835/files#r1997311521).
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #1834