diff --git a/cvat/settings/base.py b/cvat/settings/base.py index 08ae7e2b4e0d..e5f577d448b6 100644 --- a/cvat/settings/base.py +++ b/cvat/settings/base.py @@ -192,7 +192,8 @@ def generate_ssh_keys(): CORS_ALLOW_CREDENTIALS = True CSRF_TRUSTED_ORIGINS = [UI_HOST] UI_URL = '{}://{}'.format(UI_SCHEME, UI_HOST) -if len(UI_URL): + +if UI_PORT and UI_PORT != '80': UI_URL += ':{}'.format(UI_PORT) CORS_ORIGIN_WHITELIST = [UI_URL]