From 6813edbb0a7e19f766e999d6171f358a13f071c7 Mon Sep 17 00:00:00 2001 From: sky Date: Sun, 27 Jul 2025 03:34:18 -0400 Subject: [PATCH] add counter --- index.js | 2 +- public/index.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 38d1705..f8a90bb 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ app.use(express.json()); const port = process.env.PORT || 3000; const limiter = rateLimit({ windowMs: 60 * 1000, // 1 minute - limit: 50, // Limit each IP to 50 requests per `window` (here, per 1 minute). + limit: 60, // Limit each IP to 50 requests per `window` (here, per 1 minute). standardHeaders: 'draft-8', // draft-6: `RateLimit-*` headers; draft-7 & draft-8: combined `RateLimit` header legacyHeaders: false, // Disable the `X-RateLimit-*` headers. ipv6Subnet: 56, // Set to 60 or 64 to be less aggressive, or 52 or 48 to be more aggressive diff --git a/public/index.html b/public/index.html index 2d9a046..7513490 100644 --- a/public/index.html +++ b/public/index.html @@ -49,6 +49,7 @@ captchaUUID = await (await fetch("/new")).text(); document.getElementById("captcha").src = "/image/" + captchaUUID; document.getElementById("solved").value = ""; + document.getElementById("solvedNum").innerText = `solved: ${await (await fetch("/solved")).text()}` } async function submit() { await fetch('/solve', { @@ -69,5 +70,6 @@ +

solved: -

\ No newline at end of file