Setting up an effective CORS policy
If you are building a web application where the server exclusively responds to requests on a single computer, and that computer is physically disconnected from the internet, perhaps this section is not as relevant to you. For anyone else, pay attention! To be clear, you are part of "anyone else." This is important stuff.
In simple terms, cross-origin resource sharing (CORS) is a fancy way of saying accessing one domain from another domain with a browser. Without an effective strategy to handle this, your application could open up a security risk for your users.
What is the security issue with ineffective CORS?
The modern web uses a lot of JavaScript in web browsers. This enables all kinds of interactive and quality user experiences. One of those capabilities is to issue requests for data on behalf of the user without them knowing about it. This feature is one of the biggest differentiators between web applications today and web...