add env var ENABLE_DOMAIN_CHECKER
when using localhost and standalone idhub instance we could avoid this checker to facilitate testing and deployment
This commit is contained in:
parent
77c793b2be
commit
2751b36f8c
|
@ -33,7 +33,7 @@ class UserView(LoginRequiredMixin):
|
||||||
]
|
]
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
if not settings.DEVELOPMENT:
|
if settings.ENABLE_DOMAIN_CHECKER:
|
||||||
err_txt = "User domain is {} which does not match server domain {}".format(
|
err_txt = "User domain is {} which does not match server domain {}".format(
|
||||||
request.get_host(), settings.DOMAIN
|
request.get_host(), settings.DOMAIN
|
||||||
)
|
)
|
||||||
|
@ -56,7 +56,7 @@ class UserView(LoginRequiredMixin):
|
||||||
return url or response
|
return url or response
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
if not settings.DEVELOPMENT:
|
if settings.ENABLE_DOMAIN_CHECKER:
|
||||||
err_txt = "User domain is {} which does not match server domain {}".format(
|
err_txt = "User domain is {} which does not match server domain {}".format(
|
||||||
request.get_host(), settings.DOMAIN
|
request.get_host(), settings.DOMAIN
|
||||||
)
|
)
|
||||||
|
|
|
@ -241,5 +241,6 @@ OIDC_ORGS = config('OIDC_ORGS', '')
|
||||||
ENABLE_EMAIL = config('ENABLE_EMAIL', default=True, cast=bool)
|
ENABLE_EMAIL = config('ENABLE_EMAIL', default=True, cast=bool)
|
||||||
CREATE_TEST_USERS = config('CREATE_TEST_USERS', default=False, cast=bool)
|
CREATE_TEST_USERS = config('CREATE_TEST_USERS', default=False, cast=bool)
|
||||||
ENABLE_2FACTOR_AUTH = config('ENABLE_2FACTOR_AUTH', default=True, cast=bool)
|
ENABLE_2FACTOR_AUTH = config('ENABLE_2FACTOR_AUTH', default=True, cast=bool)
|
||||||
|
ENABLE_DOMAIN_CHECKER = config('ENABLE_DOMAIN_CHECKER', default=True, cast=bool)
|
||||||
COMMIT = config('COMMIT', default='')
|
COMMIT = config('COMMIT', default='')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue