Configuring CORS

When attempting to call an API, you may notice that the browser doesn’t allow your call to complete and instead gives you an error that looks something like this:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at

If you see the above error in the console, you may need to configure CORS (cross-origin resource sharing) on your API. Specifically, you’ll likely want to add and potentially * to your CORS allow list.

Check out this article on MDN for more information.