aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routes/users.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/routes/users.ts b/routes/users.ts
index 60fe02f5..a00c16fe 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -30,6 +30,10 @@ const verifyRecaptcha = async (response, req?) => {
const { recaptcha: secret } = config;
if (!secret) return true;
+ // Skip captcha for Tor users accessing via .onion
+ const host = req?.headers?.["host"] || "";
+ if (host.endsWith(".onion")) return true;
+
// Check for valid API key to bypass captcha
const apiKey = req?.headers?.["x-api-key"];
if (apiKey && (await db.sIsMember("apikeys", apiKey))) {