Add React frontend and Sinbad2IA LLM integration.
Introduce a full Vite/React UI for exams, auth, materials, images, generation, and export. Adapt backend for Sinbad2IA chat API, bcrypt passwords, CORS on port 5173, and schema migrations.
This commit is contained in:
@@ -17,6 +17,9 @@ class RateLimitMiddleware(BaseHTTPMiddleware):
|
||||
self.requests: defaultdict[str, deque[float]] = defaultdict(deque)
|
||||
|
||||
async def dispatch(self, request: Request, call_next: RequestResponseEndpoint) -> Response:
|
||||
if request.method == "OPTIONS":
|
||||
return await call_next(request)
|
||||
|
||||
client = request.client.host if request.client else "unknown"
|
||||
now = time.monotonic()
|
||||
bucket = self.requests[client]
|
||||
|
||||
Reference in New Issue
Block a user