Skip to content

Commit

Permalink
Update base.py
Browse files Browse the repository at this point in the history
Modification necessary for using CVAT from remote machines when accessing with FQDNs
See cvat-ai#1011 (comment)
and cvat-ai#1098

"I believe the reason for this is that sometimes if the port number is :80 and the URL is not in the LAN (:port), but instead it is a Fully Qualified Domain Name (:port), the port 80 is redundant (mydomain.com:80) and the errors arise."
  • Loading branch information
LukeAI authored Jan 28, 2020
1 parent 04c7669 commit 78c8d41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cvat/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 78c8d41

Please sign in to comment.