aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-06 17:24:16 +0000
committerAdam Soltys <[email protected]>2026-02-06 17:24:16 +0000
commit55aa26bad5e85baacab67725114ceac97b1153b3 (patch)
tree2923caf6e9e6371e11f9e687d3a5cd5503d2f3b9
parent9089698e8df9d0c09c165c45eb6b05335a818699 (diff)
downloadcoinos-server-55aa26bad5e85baacab67725114ceac97b1153b3.tar.gz
coinos-server-55aa26bad5e85baacab67725114ceac97b1153b3.zip
check forwarded host header
-rw-r--r--routes/users.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/users.ts b/routes/users.ts
index 64659a01..19c014c9 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -30,7 +30,7 @@ const verifyRecaptcha = async (response, req?) => {
if (!secret) return true;
// Skip captcha for Tor users accessing via .onion
- const host = req?.headers?.["host"] || "";
+ const host = req?.headers?.["x-forwarded-host"] || req?.headers?.["host"] || "";
if (host.endsWith(".onion")) return true;
// Skip captcha for allowlisted User-Agents (prefix match)