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
commitfa88b3b9f87a7cbf618e1a818cc553f1c723e1c3 (patch)
treec68468e6ca3fa8903103539d48675f34077813b9
parentHcaptcha backend (diff)
downloadserver-fa88b3b9f87a7cbf618e1a818cc553f1c723e1c3.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}`, })