React/Node API calls

0

I am doing a simple get call from a react app running in the preview browser using ip:8080 to my server running node on ip:8080. However i got some error -> Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://f9cc4b267c344e66a483383ae011af19.vfs.cloud9.eu-central-1.amazonaws.com/test. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 499.

I understand the browser is not running on the localhost and uses a proxy. However, is there a way to connect without going through a public internet and open the security group to anyware?

Michael
feita há 6 meses219 visualizações
2 Respostas
0

If you are running your app from local machine, trying to reach an api on aws, traffic will go to the internet, unless you have a Direct connect or VPN bewtween you local environment and aws.

profile picture
ESPECIALISTA
respondido há 6 meses
0

No. thats not the issue. Let me clarify the architecture. I am running the client (Cloud 9 preview browser) and server (Cloud 9 Ec2) instance. I am running both in Cloud9 but still get a connects refused / Cors error? Thanks for your help.

Michael
respondido há 6 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas