Skip to content

Commit 259a039

Browse files
committed
Use web_app_url
1 parent cdf2a9a commit 259a039

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

auth-api/src/auth_api/resources/v1/affiliation_invitation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def get_affiliation_invitation(affiliation_invitation_id):
123123
@_jwt.has_one_of_roles([Role.STAFF_CREATE_ACCOUNTS.value, Role.STAFF_MANAGE_ACCOUNTS.value, Role.PUBLIC_USER.value])
124124
def patch_affiliation_invitation(affiliation_invitation_id):
125125
"""Update the affiliation invitation specified by the provided id."""
126-
origin = request.environ.get("HTTP_ORIGIN", "localhost")
126+
origin = request.environ.get("HTTP_ORIGIN", current_app.config.get("WEB_APP_URL"))
127127
request_json = request.get_json()
128128
try:
129129
affiliation_invitation = AffiliationInvitationService.find_affiliation_invitation_by_id(
@@ -166,7 +166,7 @@ def delete_affiliation_invitation(affiliation_invitation_id):
166166
@_jwt.requires_auth
167167
def accept_affiliation_invitation_token(affiliation_invitation_id, affiliation_invitation_token):
168168
"""Check whether the passed token is valid and add affiliation from the affiliation invitation."""
169-
origin = request.environ.get("HTTP_ORIGIN", "localhost")
169+
origin = request.environ.get("HTTP_ORIGIN", current_app.config.get("WEB_APP_URL"))
170170
environment = get_request_environment()
171171

172172
try:
@@ -196,7 +196,7 @@ def accept_affiliation_invitation_token(affiliation_invitation_id, affiliation_i
196196
@_jwt.requires_auth
197197
def patch_affiliation_invitation_authorization(affiliation_invitation_id, authorize_action):
198198
"""Check if user is active part of the Org. Authorize/Refuse Authorization invite if he is."""
199-
origin = request.environ.get("HTTP_ORIGIN", "localhost")
199+
origin = request.environ.get("HTTP_ORIGIN", current_app.config.get("WEB_APP_URL"))
200200
env = get_request_environment()
201201

202202
try:

0 commit comments

Comments
 (0)