Starlette CSRF Middleware

JSON →
library 3.0.0 ·python
verified May 26, 2026

Starlette-CSRF is an active Python middleware designed for Starlette and FastAPI applications to mitigate Cross-Site Request Forgery (CSRF) attacks. It implements the Double Submit Cookie technique, providing protection by requiring a secret value to be sent in both a cookie and a request header for unsafe HTTP methods. The library is currently at version 3.0.0 and maintains a steady release cadence, with the latest major update focusing on Python version compatibility and argument handling.

total hits 21
actors 8 distinct systems
last hit 1d ago ChatGPT-User
GPTBot
5
ChatGPT-User
4
MetaBot
4
Script
1
ClaudeBot
1
Search engines
2

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany