summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-20 15:07:39 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-20 15:07:39 +1000
commit2c8eadb9ef4c0a2574d167de65cdafa14a454950 (patch)
treeb6ff4c6d99511d266e571925a3b842b645728fa1
parentHcaptcha backend (diff)
downloadserver-2c8eadb9ef4c0a2574d167de65cdafa14a454950.tar.xz
Fix content type for captcha check
-rw-r--r--api/src/util/utility/captcha.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/src/util/utility/captcha.ts b/api/src/util/utility/captcha.ts

index b32bd1c6..ba380d7a 100644 --- a/api/src/util/utility/captcha.ts +++ b/api/src/util/utility/captcha.ts
@@ -17,6 +17,9 @@ export async function verifyHcaptcha(response: string, ip?: string) { const res = await fetch("https://hcaptcha.com/siteverify", { method: "POST", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, body: `response=${response}&secret=${secret}&remoteip=${ip}&sitekey=${sitekey}`, })