diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-07-20 15:07:39 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-07-20 15:07:39 +1000 |
commit | fa88b3b9f87a7cbf618e1a818cc553f1c723e1c3 (patch) | |
tree | c68468e6ca3fa8903103539d48675f34077813b9 /api | |
parent | Hcaptcha backend (diff) | |
download | server-fa88b3b9f87a7cbf618e1a818cc553f1c723e1c3.tar.xz |
Fix content type for captcha check
Diffstat (limited to 'api')
-rw-r--r-- | api/src/util/utility/captcha.ts | 3 |
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}`, }) |