Skip to content

Conversation

@bjohansebas
Copy link
Member

Validations are being added, this would ideally be for Express 6. Maybe sending a deprecation message would be great, what do you think?

closes #6391

@UlisesGascon UlisesGascon added the semver-major This change is a semver major label Mar 18, 2025
Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

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

I think is a good idea, but we will need to introduce the deprecation notice in 5.x before merging this PR 🤔

var app = express();

app.use(function (req, res) {
res.redirect("300", 'http://google.com')
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
res.redirect("300", 'http://google.com')
res.redirect("300", 'https://google.com')

http -> https

Copy link
Member

Choose a reason for hiding this comment

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

Not bad, but also just to be clear it is not necessary in the tests.

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

Labels

6.x enhancement semver-major This change is a semver major

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Throw when the path is undefined in res.redirect.

4 participants