This commit is contained in:
alteredCoder 2022-01-26 17:38:45 +01:00
parent af3fa25a14
commit fc640552d1

View file

@ -71,13 +71,15 @@ function M.Validate(g_captcha_res, remote_ip)
remoteip = remote_ip remoteip = remote_ip
} }
data = table_to_encoded_url(body)
ngx.log(ngx.ALERT, "BODY: " .. data)
ngx.log(ngx.ALERT, "URL: " .. recaptcha_verify_url)
local httpc = http.new() local httpc = http.new()
httpc:set_timeout(3) httpc:set_timeout(3)
local res, err = httpc:request_uri(recaptcha_verify_url, { local res, err = httpc:request_uri(recaptcha_verify_url, {
method = "POST", method = "POST",
body = table_to_encoded_url(body), body = data,
headers = { headers = {
["Content-Type"] = "application/x-www-form-urlencoded", ["Content-Type"] = "application/x-www-form-urlencoded",
}, },