tile38
tile38 copied to clipboard
Add support for CORS in http requests
Please do not open a pull request without first filing an issue and/or discussing the feature directly with the project maintainer.
Please ensure you adhere to every item in this list
- [ ] This PR was pre-approved by the project maintainer
- [x] I have self-reviewed the code
- [x] I have added all necessary tests
Describe your changes
Adds support for OPTIONS HTTP request and returns necessary headers to allow CORS to function properly
Issue number and link
https://github.com/tidwall/tile38/issues/737
I'm not quite sure how testing should be performed here as I don't see any testing of the http interface right now.. maybe i'm missing something. Could use a pointer on where and how you'd like me to write tests.
Tests can be done with standard HTTP requests.
Tests added
Verified against my test project in chrome. Request works successfully.