You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "billmoling (via GitHub)" <gi...@apache.org> on 2025/08/18 22:51:23 UTC
[I] feat: Support for returning 405 Method Not Allowed for invalid HTTP methods on valid routes [apisix]
billmoling opened a new issue, #12531:
URL: https://github.com/apache/apisix/issues/12531
### Description
Description:
When making an HTTP method request (e.g., PUT or GET) on a valid URL in APISIX, the server currently responds with a 404 Not Found if the method is not allowed on that endpoint. According to HTTP standards, the correct behavior should be to return a 405 Method Not Allowed status code to indicate that the resource exists but the HTTP method is unsupported.
Currently, achieving this requires the paid exit-transformer plugin from API7 Enterprise edition, which allows response customization including status code rewrites. This plugin is not available in the open-source version of APISIX.
Request:
Consider adding native support or a community plugin for returning 405 for disallowed HTTP methods on valid routes.
This would improve HTTP compliance and usability for APISIX users who use the open-source version.
Any pointers or community interest in developing such a plugin would be appreciated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] feat: Support for returning 405 Method Not Allowed for invalid HTTP methods on valid routes [apisix]
Posted by "SkyeYoung (via GitHub)" <gi...@apache.org>.
SkyeYoung commented on issue #12531:
URL: https://github.com/apache/apisix/issues/12531#issuecomment-3198850674
@billmoling If you're interested, feel free to submit relevant proposals and pull requests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] feat: Support for returning 405 Method Not Allowed for invalid HTTP methods on valid routes [apisix]
Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop closed issue #12531: feat: Support for returning 405 Method Not Allowed for invalid HTTP methods on valid routes
URL: https://github.com/apache/apisix/issues/12531
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] feat: Support for returning 405 Method Not Allowed for invalid HTTP methods on valid routes [apisix]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #12531:
URL: https://github.com/apache/apisix/issues/12531#issuecomment-3199523163
<!-- Answer -->
A 404 response means that the requested resource does not exist, or that the server does not want the client to know it exists.
In Apache APISIX, HTTP method is one of the routing match conditions, just like uri or args. If a client request does not meet all of these conditions, APISIX will return 404 without exposing the exact reason for the mismatch. Developers can still review the detailed cause through the logs.
_Written by @dosu, edited by moonming_
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/ab261614-3cf7-4083-b6a5-b7b339645417?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/ab261614-3cf7-4083-b6a5-b7b339645417?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/ab261614-3cf7-4083-b6a5-b7b339645417?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/ab261614-3cf7-4083-b6a5-b7b339645417?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ab261614-3cf7-4083-b6a5-b7b339645417?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/ab261614-3cf7-4083-b6a5-b7b339645417?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/ab261614-3cf7-4083-b6a5-b7b339645417?feedback_type=other)</sup> [](https://app.dosu.dev/6aff3395-54f4-4ca2-8624-021d21c2f031/ask?utm_source=githu
b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/apisix/issues/12531)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org