canove / whaticket-community

A very simple Ticket System based on WhatsApp messages, that allow multi-users in same WhatsApp account.
MIT License
1.55k stars 795 forks source link

Cors #539

Closed JJtarazona closed 1 year ago

JJtarazona commented 1 year ago

Hola, ya he instalado whaticket, pero la momento de hacer registro o ingresar no me deja, cuando voy a ver los errores me arroja los siguiente por consola: "Acess to XMLHttpRequest at 'http://localhost:8080/socket.io/?EIO=4&transport=polling&t=OUhMhK9' from origin 'http://localhost:3000' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://localhost:3000' that is not equal to the supplied origin." Alguien sabe como puedo solucionar?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

PwccaCode commented 1 year ago

You have to run a cors everywhere server or use a tunneling

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

nicoforlano commented 1 year ago

@JJtarazona Inicialmente había tenido el mismo error.

En mi caso, al estar corriendo la aplicación en localhost, el problema era que la URL del frontend estaba definida usando https en envés de http. Por lo tanto, el backend no reconocía el origen e indicaba error de CORS.

Simplemente puedes cambiar la variable de entorno a FRONTEND_URL=http://localhost:3000 (en el archivo .env en /backend ) y correr nuevamente el backend.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.