Spaces:
Running
Running
Update server.js
Browse files
server.js
CHANGED
@@ -235,7 +235,7 @@ app.post("/api/ask-ai", async (req, res) => {
|
|
235 |
req.ip ||
|
236 |
"0.0.0.0";
|
237 |
|
238 |
-
if (!
|
239 |
ipAddresses.set(ip, (ipAddresses.get(ip) || 0) + 1);
|
240 |
if (ipAddresses.get(ip) > MAX_REQUESTS_PER_IP) {
|
241 |
return res.status(429).send({
|
|
|
235 |
req.ip ||
|
236 |
"0.0.0.0";
|
237 |
|
238 |
+
if (!token) {
|
239 |
ipAddresses.set(ip, (ipAddresses.get(ip) || 0) + 1);
|
240 |
if (ipAddresses.get(ip) > MAX_REQUESTS_PER_IP) {
|
241 |
return res.status(429).send({
|