Sunday 26 November 2017

Having troubles making a GET request to express server.....

I am running an express server on 127.0.0.1:8080 and I am running an http-server for the client side on 127.0.0.1:8081.Here is the code.I am able to make a request to http://127.0.0.1:8080/, but not http://ift.tt/2zF5tal, I get a CORS error. I know that the server receives the requests (for http://127.0.0.1:8080/ and http://ift.tt/2zF5tal), because it writes to console.Failed to load http://ift.tt/2zF5tal: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8081' is therefore not allowed access.What I am doing wrong, please help !!!Thank you.

Submitted November 26, 2017 at 07:25AM by CheBurashka_GG

No comments:

Post a Comment