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

Send Allow header when method is not allowed #4

Merged
merged 1 commit into from
Apr 13, 2017
Merged

Send Allow header when method is not allowed #4

merged 1 commit into from
Apr 13, 2017

Conversation

shadowhand
Copy link
Member

@shadowhand shadowhand commented Apr 13, 2017

With HTTP status 405 the response must include an Allow header
that declares the allowed methods for the request.

From the docs:

NOTE: The HTTP specification requires that a 405 Method Not Allowed response include the
Allow: header to detail available methods for the requested resource. Applications using FastRoute should use the second array element to add this header when relaying a 405 response.

With HTTP status 405 the response **must** include an `Allow` header
that declares the allowed methods for the request.

https://github.com/nikic/FastRoute#dispatching-a-uri
@oscarotero oscarotero merged commit 6a23e9e into middlewares:master Apr 13, 2017
@shadowhand shadowhand deleted the fix/allow-header branch April 13, 2017 19:04
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.

2 participants