Node JS Tutorial in Hindi #57 Fix CORS Issues in Node.js APIs (Cross-Origin Resource Sharing)

Cors issues


Points of this video

  1. What is cors issues
  2. Understand issues with API call
  3. Fix Cors issues
  4. Test and verify issues
  5. Interview Questions
  6. Notes, Code and playlist.



What is Cors

CORS stands for Cross-Origin Resource Sharing.

It's a browser security feature

that restricts web pages from making requests to a different domain (origin) than the one that served the web page.



Example :- Below urls are treated as different domains

http://localhost:3000 ------> UI

http://localhost:3200 ------> Node

same as

www.abc.com ------> UI

www.xyz.com ------> Node