vasanthv / jsonbox

HTTP-based JSON storage.
https://jsonbox.io
MIT License
2.49k stars 171 forks source link

cors issue #3

Closed pseudozach closed 5 years ago

pseudozach commented 5 years ago

Hi, Thanks for this great service. Do you have any plans to enable CORS? I'm getting the below error when querying from browser: Access to XMLHttpRequest at 'https://jsonbox.io/box_xxx?query_key=asd&query_value=qwe' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

srebalaji commented 5 years ago

I think enabling CORS will be great.

vasanthv commented 5 years ago

@pseudozach @srebalaji thanks for trying it out and raising this. I have enabled CORS now. https://github.com/vasanthv/jsonbox/commit/c2df3fb62430663cb6f4f47f09faae4781148e46