# CORS: Which Web Pages May Call Your API

A browser lets a web page read answers only from its own origin unless the API allows it, and FastAPI's CORSMiddleware with an allow-list of origins lets the club's own pages in, which protects people's browsers but never stops a script or a tool.

![Cheat sheet: CORS: Which Web Pages May Call Your API](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/d3b39a7f04a24c3c9bad3239a084f0d6.webp)

- Category: FastAPI
- Level: Journeyman
- Tags: CORS, CORS Middleware, fastapi, Middleware (fastapi), Preflight Request, Same-Origin Policy, web-development
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/fastapi-security-cors-cheat-sheet
