My code runs fine on localhost but when i upload it on a remote server it gives me two errors:
Access to XMLHttpRequest at ‘http:servername:4000/getArticleContent’ from origin ‘http://servername’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
and
-
message: “Http failure response for http://64.227.111.22:4000/getArticleContent: 0 Unknown Error”
-
name: “HttpErrorResponse”
Please i need urgent help
I have added cors on the server file and i tried using proxy then i tried adding the port number to it
wurld-create is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.