CartoDB/CartoDB-SQL-API

CORS

Opened this issue · 2 comments

The sql-router can't get POST requests from Axios because of CORS denial.
Using the cors module via "require("cors")" works fine.

Hi @Done-can!

Thanks for reporting the issue. Could you describe your use case?. Do you have a running instance of SQL-API? It's the open-source version, isn't it?

Using the open-source version, yeah. Developing a service in Nodejs that sends POST requests to the sql-api with axios module. The api denies the request due to CORS violation, while the api allow CORS with a middleware written in the api.
I'm familiar with the CORS module so I changed it, and the POST requests work.