Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Fix captcha HTTP request
Uku Taht7bfd7cc2192f
diff --git a/lib/plausible_web/captcha.ex b/lib/plausible_web/captcha.exindex b05d607f40..bffde5634a 100644--- a/lib/plausible_web/captcha.ex+++ b/lib/plausible_web/captcha.ex@@ -17,12 +17,18 @@ defmodule PlausibleWeb.Captcha dores =HTTPClient.post(@verify_endpoint,- [],- {:form, [{"response", token}, {"secret", secret()}]}+ [{"Content-Type", "application/x-www-form-urlencoded"}],+ "response=#{token}&secret=#{secret()}")- json = Jason.decode!(res.body)- json["success"]+ case res do+ {:ok, %Finch.Response{status: 200, body: body}} ->+ json = Jason.decode!(body)+ json["success"]++ _ ->+ false+ endelsetrueend