Comments (6)
Bom dia, @developerdevice.
Geralmente esses erros ocorrem quando a configuração do ".env" não está correta no backend. Posta o exato erro que aparece no navegador e também seu arquivo .env do backend pra gente tentar entender melhor.
Abraço
from whaticket-community.
Esse é o meu arquivo .env
NODE_ENV=DEVELOPMENT
BACKEND_URL=https://api.meusite.com.br
FRONTEND_URL=https://app.meusite.com.br
PROXY_PORT=443
PORT=8080
DB_HOST=localhost
DB_DIALECT=
DB_USER=whaticket
DB_PASS=whaticket
DB_NAME=whaticket
JWT_SECRET=3123123213123
JWT_REFRESH_SECRET=75756756756
Abaixo o erro no browser
Requisição cross-origin bloqueada: A política de mesma origem (Same Origin Policy) impede a leitura do recurso remoto em https://api.meusite.com.br/whatsapp/. (Motivo: esperado 'true' no cabeçalho CORS 'Access-Control-Allow-Credentials').
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.meusite.com.br/whatsapp/. (Reason: CORS request did not succeed).
Requisição cross-origin bloqueada: A política de mesma origem (Same Origin Policy) impede a leitura do recurso remoto em https://api.meusite.com.br/users/2. (Motivo: esperado 'true' no cabeçalho CORS 'Access-Control-Allow-Credentials').
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.meusite.com.br/users/2. (Reason: CORS request did not succeed).
Requisição cross-origin bloqueada: A política de mesma origem (Same Origin Policy) impede a leitura do recurso remoto em https://api.meusite.com.br/tickets?withUnreadMessages=true. (Motivo: esperado 'true' no cabeçalho CORS 'Access-Control-Allow-Credentials').
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.meusite.com.br/tickets?withUnreadMessages=true. (Reason: CORS request did not succeed).
Requisição cross-origin bloqueada: A política de mesma origem (Same Origin Policy) impede a leitura do recurso remoto em https://api.meusite.com.br/tickets?pageNumber=1&status=open&showAll=false. (Motivo: esperado 'true' no cabeçalho CORS 'Access-Control-Allow-Credentials').
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.meusite.com.br/tickets?pageNumber=1&status=open&showAll=false. (Reason: CORS request did not succeed).
Requisição cross-origin bloqueada: A política de mesma origem (Same Origin Policy) impede a leitura do recurso remoto em https://api.meusite.com.br/tickets?pageNumber=1&status=pending&showAll=true. (Motivo: esperado 'true' no cabeçalho CORS 'Access-Control-Allow-Credentials').
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.meusite.com.br/tickets?pageNumber=1&status=pending&showAll=true. (Reason: CORS request did not succeed).
from whaticket-community.
Acredito que o nginx pode estar conflitando com a política de CORS do express. O seu arquivo de configuração do nginx está exatamente igual ao do tutorial?
from whaticket-community.
esse é o backend, eu revisei todo o readme, refiz todos os passos, mas estagnou nesse passo.
from whaticket-community.
Parece estar tudo ok. Em qual cloud provider vc está rodando a aplicação? As políticas de CORS são definidas no arquivo app.ts do backend:
Se você não alterou esse arquivo, tudo deveria funcionar corretamente...
from whaticket-community.
Apaguei a pasta backend
e subi a do github, só assim parou os erros, obrigado pela força.
from whaticket-community.
Related Issues (20)
- qr does not connect, it could be that whatsapp blocked the qr HOT 24
- Error Build Frontend HOT 2
- updated whatsapp-web.js - 1.23.0 after not working HOT 8
- Stickers não aparecem embaixo da mensagem - Reação por Emoji HOT 1
- send broadcast message HOT 1
- pending kernel upgrade HOT 2
- Installation error HOT 2
- Erro na leitura do QRCode HOT 2
- The connection menu appears an exclamation mark
- Error appears after running npm run build HOT 4
- Add SQLite support
- QR Error never connects HOT 9
- Error from backend docker image (lodash) HOT 2
- Acabei de baixar o código do GIT HOT 1
- qr does not connect, HOT 2
- Filtering problems
- npm run build show errors
- Ubuntu 22 e instalacao
- Conversa nao aparece HOT 2
- Não gera o modal do QR Code para conectar o Whatsapp HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whaticket-community.