From 1e8b95de07c283e118c4f41cc5e4faac1e3361a3 Mon Sep 17 00:00:00 2001 From: Sunil Shetye Date: Fri, 11 Jul 2025 12:41:33 +0530 Subject: use POST_ACTIVATE_REDIRECT_URL instead of request.get_host() --- blocks/authAPI/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blocks/authAPI/views.py b/blocks/authAPI/views.py index 49dbdac2..8afd799a 100644 --- a/blocks/authAPI/views.py +++ b/blocks/authAPI/views.py @@ -25,8 +25,7 @@ def activate_user(request, uid, token): Link to this route is sent via email to user for verification """ - protocol = 'https://' if request.is_secure() else 'http://' - web_url = protocol + request.get_host() + '/api/auth/users/activation/' # URL comes from Djoser library + web_url = settings.POST_ACTIVATE_REDIRECT_URL + 'api/auth/users/activation/' # URL comes from Djoser library return render(request, 'activate_user.html', {'uid': uid, 'token': token, -- cgit