Skip to content

Commit

Permalink
moved url for captcha verification to env
Browse files Browse the repository at this point in the history
  • Loading branch information
superolegatron committed Sep 15, 2024
1 parent 312bc82 commit aaf91d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions BackEnd/forum/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def show_toolbar(request):

# ReCaptcha V2 Invisible
RECAPTCHA_V2_PRIVATE_KEY = config("RECAPTCHA_V2_PRIVATE_KEY")
RECAPTCHA_URL = config("RECAPTCHA_URL")

CONTACTS_INFO = {
"email": "craft.forum0@gmail.com",
Expand Down
2 changes: 1 addition & 1 deletion BackEnd/validation/validate_recaptcha.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def verify_recaptcha(token):
"""
Validates the reCAPTCHA token with Google's API.
"""
recaptcha_url = "https://www.google.com/recaptcha/api/siteverify"
recaptcha_url = settings.RECAPTCHA_URL
recaptcha_data = {
"secret": settings.RECAPTCHA_V2_PRIVATE_KEY,
"response": token,
Expand Down

0 comments on commit aaf91d4

Please sign in to comment.