DevApp Problem with CORS login

Hi there,

I’m developing a mobile app that has to contact an external API (a rails server) in order to send email and password through a POST request, and receive a response with an authentication token.

I’m running

$ ionic serve --no-open -c

To run my server on my station, then I try to connect with my phone using “DevApp”. I’ve shut off my firewall on the laptop, I’m able to connect to it, but whenever I try to login from the DevApp, I get an error message. By checking the logs on the rails server, I know that the ionic serve is sending a “OPTIONS” as method on the request done by the mobile app.

I believe it is a CORS problem, ¿how can I disable this security measure in the ionic serve? has anyone some idea?

Best regards,


1 Like