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
asked 5 months ago203 views
2 Answers
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
EXPERT
answered 5 months ago
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
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions