Skip to content

Commit

Permalink
Log captcha verify response
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomognosis committed Apr 10, 2024
1 parent daf3366 commit 2bc83da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/api/services/captcha.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import requests
import logging


logging.basicConfig(level=logging.INFO)


def captcha_verify(client_response, catpcha_api_url, secret_key, remote_ip, site_key):
Expand All @@ -9,6 +13,8 @@ def captcha_verify(client_response, catpcha_api_url, secret_key, remote_ip, site
'sitekey': site_key
})

logging.info('Captcha verify response: %s' % request.json())

if request.status_code != 200:
return False
return request.json()['success'] == True

0 comments on commit 2bc83da

Please sign in to comment.