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
gefragt vor 6 Monaten219 Aufrufe
2 Antworten
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
EXPERTE
beantwortet vor 6 Monaten
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
beantwortet vor 6 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen