Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 405: Method not allowed #2366

Merged
merged 32 commits into from
Feb 3, 2025
Merged

feat: 405: Method not allowed #2366

merged 32 commits into from
Feb 3, 2025

Conversation

RobinTail
Copy link
Owner

@RobinTail RobinTail commented Jan 31, 2025

There is an HTTP code 405 for routes that exist, but require different method.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405

Unfortunately, req.route is undefined when within middlewares, so have to use app.all() as recommended.

@RobinTail RobinTail added the enhancement New feature or request label Jan 31, 2025
@RobinTail RobinTail marked this pull request as ready for review February 1, 2025 23:45
@RobinTail RobinTail marked this pull request as draft February 2, 2025 12:27
@RobinTail RobinTail marked this pull request as ready for review February 3, 2025 06:21
RobinTail

This comment was marked as outdated.

@RobinTail RobinTail added the documentation Improvements or additions to documentation label Feb 3, 2025
Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

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

now ok

@RobinTail RobinTail merged commit cb506a1 into master Feb 3, 2025
9 checks passed
@RobinTail RobinTail deleted the not-found-405 branch February 3, 2025 10:10
Copy link

coveralls-official bot commented Feb 3, 2025

Coverage Status

coverage: 100.0%. remained the same
when pulling 12d3e9c on not-found-405
into 5fd6252 on master.

RobinTail added a commit that referenced this pull request Feb 6, 2025
Feature was introduced in #2366 .
Making it default behavior in next major.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant