flowcl-node-api-client icon indicating copy to clipboard operation
flowcl-node-api-client copied to clipboard

Error de CORS

Open gonzafg2 opened this issue 4 years ago • 3 comments

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.

gonzafg2 avatar Jul 26 '20 04:07 gonzafg2

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.

gburgost avatar Aug 31 '20 03:08 gburgost

Alguno ha podido solucionar?

elyohan14 avatar Feb 26 '21 21:02 elyohan14

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, }) );

BabyWhite69 avatar May 02 '21 21:05 BabyWhite69