fix: 修复 DOMAINS 添加 80和443 不生效的问题

pull/11686/head
ibuler 2023-09-22 17:07:52 +08:00 committed by 老广
parent 43dbb4c226
commit 0cf17310e1
1 changed files with 1 additions and 0 deletions

View File

@ -79,6 +79,7 @@ if CONFIG.SITE_URL:
ALLOWED_DOMAINS = DOMAINS.split(',') if DOMAINS else ['localhost:8080']
ALLOWED_DOMAINS = [host.strip() for host in ALLOWED_DOMAINS]
ALLOWED_DOMAINS = [host.replace('http://', '').replace('https://', '') for host in ALLOWED_DOMAINS if host]
ALLOWED_DOMAINS = [host.replace(':80', '').replace(':443', '') for host in ALLOWED_DOMAINS]
ALLOWED_DOMAINS = [host.split('/')[0] for host in ALLOWED_DOMAINS if host]
DEBUG_HOSTS = ('127.0.0.1', 'localhost', 'core')