Spaces:
Sleeping
Sleeping
increase max request per IP
Browse files22 unmodified lines23242526272829133 unmodified lines16316416516516616716816922 unmodified linesconst REDIRECT_URI = process.env.REDIRECT_URI || `http://localhost:${PORT}/auth/login`;const MODEL_ID = "deepseek-ai/DeepSeek-V3-0324";const MAX_REQUESTS_PER_IP = 4;
app.use(cookieParser());app.use(bodyParser.json());133 unmodified lines if (!hf_token) { // Rate limit requests from the same IP address, to prevent abuse, free is limited to 2 requests per IP ipAddresses.set(ip, (ipAddresses.get(ip) || 0) + 1); if (ipAddresses.get(ip) > 2) { if (ipAddresses.get(ip) > MAX_REQUESTS_PER_IP) { return res.status(429).send({ ok: false, openLogin: true,server.js+2-1