From 9789757d2d90cdb492c839ea2f4b719b745bea52 Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Wed, 15 Nov 2023 18:18:00 +0530 Subject: [PATCH] dev: fix current site domain registration --- apiserver/plane/api/views/project.py | 2 +- apiserver/plane/api/views/workspace.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apiserver/plane/api/views/project.py b/apiserver/plane/api/views/project.py index 08c7fee4d..ce7750105 100644 --- a/apiserver/plane/api/views/project.py +++ b/apiserver/plane/api/views/project.py @@ -427,7 +427,7 @@ class ProjectInvitationsViewset(BaseViewSet): project_invitations = ProjectMemberInvite.objects.bulk_create( project_invitations, batch_size=10, ignore_conflicts=True ) - current_site = f"{request.scheme}://{request.get_host()}", + current_site = request.META.get('HTTP_ORIGIN') # Send invitations for invitation in project_invitations: diff --git a/apiserver/plane/api/views/workspace.py b/apiserver/plane/api/views/workspace.py index 3fc9b7bde..8804d48ef 100644 --- a/apiserver/plane/api/views/workspace.py +++ b/apiserver/plane/api/views/workspace.py @@ -319,7 +319,7 @@ class WorkspaceInvitationsViewset(BaseViewSet): workspace_invitations, batch_size=10, ignore_conflicts=True ) - current_site = f"{request.scheme}://{request.get_host()}", + current_site = request.META.get('HTTP_ORIGIN') # Send invitations for invitation in workspace_invitations: