Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error de CORS #2

Open
gonzafg2 opened this issue Jul 26, 2020 · 3 comments
Open

Error de CORS #2

gonzafg2 opened this issue Jul 26, 2020 · 3 comments

Comments

@gonzafg2
Copy link

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.

@gburgost
Copy link

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.

@elyohan14
Copy link

Alguno ha podido solucionar?

@BabyWhite69
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants