tidwall / tile38

Real-time Geospatial and Geofencing
https://tile38.com
MIT License
8.96k stars 561 forks source link

Add support for CORS in http requests #738

Closed Kilowhisky closed 3 weeks ago

Kilowhisky commented 1 month ago

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

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.

Kilowhisky commented 1 month ago

Tests added

Kilowhisky commented 1 month ago

Verified against my test project in chrome. Request works successfully.

Screenshot 2024-05-06 at 10 12 56 PM Screenshot 2024-05-06 at 10 14 00 PM Screenshot 2024-05-06 at 10 14 50 PM
tidwall commented 3 weeks ago

I'm cool with this. 🎸