Knowledge-sharing: Cross-Origin Resource Sharing

Introduction to CORS

You are developing your webpage and everything is working fine. As you start to extend your webpage and fetch data from your backend, nothing works! WTF, you investigate and can see CORS messages in your browser’s console.

In this session, we look at the motivation for creating and implementing CORS in browsers and deep-dive into how it works.

Topics covered:

  • Motivation for CORS
  • Origin
  • Cors Intro & Deep Dive
    • Simple Requests
    • Pre-flight Requests
    • Credential Requests
  • Azure App Service Cors
    • Default Azure behavior
    • How to configure
  • ASP.NET WebAPI Cors
    • How to configure
    • Middleware/Attributes
  • Backend-for Frontend

The presentation and Source code can be found here: kefo-azure-cors