diff options
| author | Adam Soltys <[email protected]> | 2026-01-27 09:41:08 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-01-27 09:41:08 -0800 |
| commit | 197c75a02560ff153d73d3fe218fed312ccceaa4 (patch) | |
| tree | bbaa2bb0af2359997808544afeec0f3253bca4e6 /routes | |
| parent | 360ead1d6787558a76fb16286b1a0a2dda44212e (diff) | |
| download | coinos-server-197c75a02560ff153d73d3fe218fed312ccceaa4.tar.gz coinos-server-197c75a02560ff153d73d3fe218fed312ccceaa4.zip | |
skip captcha for tor
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/users.ts | 4 |
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))) { |
