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

Return allow header #1625

Closed
wants to merge 0 commits into from

Conversation

geeksilva97
Copy link
Contributor

@geeksilva97 geeksilva97 commented Jan 17, 2024

This PR addresses #993

Proposed changes

  • Add allow header to all responses
  • Minor refactor

@geeksilva97 geeksilva97 marked this pull request as ready for review January 17, 2024 22:59
@geeksilva97
Copy link
Contributor Author

geeksilva97 commented Jan 17, 2024

Hopefully, I could make it right this time @essen

@essen
Copy link
Member

essen commented Jan 23, 2024

This needs tests. Proper tests would show you this doesn't work: for example if the request ends in service_available the allowed methods aren't currently known and the value is undefined so your code will crash.

The appropriate way to implement this is probably to do set_resp_headers after the allowed_methods callback was handled.

@geeksilva97
Copy link
Contributor Author

Will be working on that this week

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