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 | 2c8eadb9ef4c0a2574d167de65cdafa14a454950 (patch) | |
tree | b6ff4c6d99511d266e571925a3b842b645728fa1 /api | |
parent | Hcaptcha backend (diff) | |
download | server-2c8eadb9ef4c0a2574d167de65cdafa14a454950.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}`, }) |