Skip to content

docs: update res.redirect examples to use default 302#2309

Merged
bjohansebas merged 3 commits into
expressjs:mainfrom
debojeetmitra:debojeetmitra-patch-1
Jun 22, 2026
Merged

docs: update res.redirect examples to use default 302#2309
bjohansebas merged 3 commits into
expressjs:mainfrom
debojeetmitra:debojeetmitra-patch-1

Conversation

@debojeetmitra

@debojeetmitra debojeetmitra commented May 16, 2026

Copy link
Copy Markdown
Contributor

Updates the res.redirect examples in the migration guide to reflect the default temporary redirect behavior (302) instead of explicitly using 301.

This helps reduce confusion during migration from Express 4 to 5 and avoids unintentionally encouraging permanent redirects.

closes #2308

Signed-off-by: Debojeet Mitra <142051979+debojeetmitra@users.noreply.github.com>
@debojeetmitra debojeetmitra requested a review from a team as a code owner May 16, 2026 05:37
@netlify

netlify Bot commented May 16, 2026

Copy link
Copy Markdown

Deploy Preview for expressjscom-preview ready!

Name Link
🔨 Latest commit 18f48d7
🔍 Latest deploy log https://app.netlify.com/projects/expressjscom-preview/deploys/6a387b687cd9f4000850c1de
😎 Deploy Preview https://deploy-preview-2309--expressjscom-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@krzysdz

krzysdz commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@bjohansebas this is supposed to "fix" #2308

@bjohansebas

Copy link
Copy Markdown
Member

thanks @krzysdz and @debojeetmitra!

@bjohansebas bjohansebas merged commit 7601032 into expressjs:main Jun 22, 2026
14 of 17 checks passed
@debojeetmitra

Copy link
Copy Markdown
Contributor Author

Thank you for the review and merge! Looking forward to contributing more to Express.js in the future.

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.

res.redirect: Code examples should show default HTTP status code 302 instead of 301

3 participants