0

I received the following Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <my-ip-address> (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

after calling the rest server from my angular app, the code was working perfect when I was using local rest server

  • Can you add more details, Where is your current network is hosted and your current angular app is ? – Karthikeyan Jun 28 '18 at 09:00
  • Reason: CORS header 'Access-Control-Allow-Origin' missing tells you everything. Means that access from a browser fails because of the CORS preflight check. Eg on a POST you'd use `res.header("Access-Control-Allow-origin","*");` etc. Example in first answer here -> https://stackoverflow.com/questions/50317575/passportjsangular5-no-access-control-allow-origin-header-is-present-on-the/50317699 – Paul O'Mahony Jul 02 '18 at 15:02

0 Answers0