diff --git a/seahub/api2/endpoints/sso/client_sso_link.py b/seahub/api2/endpoints/sso/client_sso_link.py index 390f1ea646f..a4556204957 100644 --- a/seahub/api2/endpoints/sso/client_sso_link.py +++ b/seahub/api2/endpoints/sso/client_sso_link.py @@ -10,7 +10,7 @@ from seahub.api2.throttling import AnonRateThrottle from seahub.base.models import ClientSSOToken, STATUS_ERROR -from seahub.utils import get_service_url, gen_token +from seahub.utils import gen_token, get_site_scheme_and_netloc from seahub.api2.utils import api_error from seahub.settings import CLIENT_SSO_TOKEN_EXPIRATION @@ -58,6 +58,5 @@ def post(self, request): transaction.set_autocommit(True) return Response({ - 'link': get_service_url().rstrip('/') + reverse( - 'client_sso', args=[t.token]) + 'link': get_site_scheme_and_netloc() + reverse('client_sso', args=[t.token]) })