📄️ Understanding Middleware
Middleware in FastAPI is a crucial piece of the puzzle when it comes to building web applications. In simple terms, middleware is a piece of software that sits between the server and the application. It can process requests before they reach your application, or responses before they return to the client.
📄️ Handling Cross-Origin Resource Sharing (CORS)
Cross-Origin Resource Sharing (CORS) is a mechanism that allows many resources (e.g., fonts, JavaScript, etc.) on a web page to be requested from another domain outside the domain from which the resource originated. In FastAPI, handling CORS means setting up our FastAPI application to correctly respond to CORS preflight requests and allow certain types of traffic from certain origins.
📄️ Working with CSRF and Sessions
FastAPI Middleware, CORS, CSRF, and Sessions