-
Notifications
You must be signed in to change notification settings - Fork 31
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
Handling CORS requests and missing OPTIONS handler in bao.ts #23
Comments
I would have assumed this would work, but apperently it doesn't:
|
I did something like this:
Also, correct me if I'm wrong but the OPTIONS handling in bao is missing, I added it like this: |
@lazydefi1 Could you perhaps create a PR for this update. Without the OPTIONS handling, I cannot really implement CORS, as my app sends a preflight OPTIONS request to check for CORS headers that I cannot handle. I hope it will be accepted, though, since the last code change is 3 months old, so that is not very promising... I've implemented a work around using the |
I've created PR #28 to support this. Please take a look and let me know what you think as I haven't actually tested it yet - if anyone wants to write some test cases that would be much appreciated! |
How do you handle CORS requests?
CORS requests come from the browser through OPTIONS methods. It seems their handling is missing from
bao.ts
. Should I make a PR to add this?The text was updated successfully, but these errors were encountered: