Files
gw/backend/app/middleware/rate_limit.py
T

9 lines
245 B
Python
Raw Normal View History

2026-04-18 07:23:55 +12:00
"""
slowapi rate limiter setup.
Import `limiter` here and attach it to the FastAPI app in main.py.
"""
from slowapi import Limiter
from slowapi.util import get_remote_address
limiter = Limiter(key_func=get_remote_address, headers_enabled=True)