flowcl-node-api-client
flowcl-node-api-client copied to clipboard
Error de CORS
Tuve un error de cors:
Access to XMLHttpRequest at 'https://www.flow.cl/api/payment/create' from origin has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
A alguien más le ha pasado?
Utilizo Quasar Framework y firebase en el back.
Hola @gonzafg2 lo pudiste solucionar? estoy intentando lo mismo con React, y me muestra el error: (Estoy haciendo las priebas localmente)
Access to fetch at 'https://sandbox.flow.cl/api/payment/create' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Alguno ha podido solucionar?
Hola @gburgost y @elyohan14
npm i cors
y ponen esto del lado del servidor, solo tienen que cambiar la url de su cliente.
app.use( cors({ origin: ["http://localhost:3000"], credentials: true, }) );