-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Get CORS support working with XHR preflight #88
Conversation
I tried your fork and i still get a 404 edit: nevermind, my app was sending Authorization header which was causing it to be rejected |
+1 for merging this! |
ping @indexzero, can you get this merged? |
@paulmelnikow can you rebase off |
done |
@paulmelnikow read a little closer, there is actually a Bonus points if you write tests. |
Ah, makes sense. I'll take another pass. |
Without this patch, http-server returns 404 on the preflight request (method: 'OPTIONS'). You can see the problem by loading an XHR request in Firefox.
Updated, now honoring the cors option. Includes a test which fails if you remove |
Awesome! Merging. Thanks for writing the tests 💯 |
Get CORS support working with XHR preflight
Without this patch, http-server returns 404 on the preflight request (method: 'OPTIONS'). You can see the problem by loading an XHR request in Chrome.