We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm not sure if it's supposed to work that way, but enabling CORS change HTTP return code to always return 200.
import { AutoRouter, cors, error } from 'itty-router' const { preflight, corsify } = cors() const router = AutoRouter({ before: [preflight], finally: [corsify], }) router.get('/', () => error(404)) export default { ...router }
Request should return 404.
Request return 200.
The text was updated successfully, but these errors were encountered:
Definitely not the intended behavior - thanks for catching that!
Starting the tests now~
Sorry, something went wrong.
Confirmed, will have a fix out momentarily!
fix #233 - cors eats status message
d6b7a17
1ab9ca7
released v5.0.6 - fixed #233 cors not honoring response.status
ddc41f9
Released as 5.0.6 just now :)
5.0.6
Thanks again for the catch!
No branches or pull requests
Describe the Issue
I'm not sure if it's supposed to work that way, but enabling CORS change HTTP return code to always return 200.
Example Router Code
Steps to Reproduce
Expected Behavior
Request should return 404.
Actual Behavior
Request return 200.
Environment:
The text was updated successfully, but these errors were encountered: