# Browsers and Traffic

Browsers and Traffic: CORS: Which Web Pages May Call Your API, Rate Limits and Security Headers.

Updated: November 19, 2026

1. [CORS: Which Web Pages May Call Your API](https://www.ask-codey.com/lessons/fastapi-security-cors) (Journeyman): 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.
2. [Rate Limits and Security Headers](https://www.ask-codey.com/lessons/fastapi-security-rate-limits-and-headers) (Journeyman): A sign-in route that answers every guess lets a script try thousands of passwords, so a rate limit counts each address's tries in a window of time and answers 429 with Retry-After, slowapi puts one on a FastAPI route, and a small middleware adds security headers to every answer.

Source: https://www.ask-codey.com/courses/python-web-apis/topics/fastapi-browsers-and-traffic
