perf: 优化 CORE_HOST

pull/11241/head
ibuler 1 year ago
parent c769c06202
commit 07530bc56b

@ -68,8 +68,11 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# LOG LEVEL # LOG LEVEL
LOG_LEVEL = CONFIG.LOG_LEVEL LOG_LEVEL = CONFIG.LOG_LEVEL
DOMAINS = CONFIG.DOMAINS or 'localhost' DOMAINS = CONFIG.DOMAINS or 'localhost'
if os.environ.get('SERVER_NAME'): for name in ['SERVER_NAME', 'CORE_HOST']:
DOMAINS += ',{}'.format(os.environ.get('SERVER_NAME')) env = os.environ.get(name)
if not env:
continue
DOMAINS += ',{}'.format(env)
if CONFIG.SITE_URL: if CONFIG.SITE_URL:
DOMAINS += ',{}'.format(CONFIG.SITE_URL) DOMAINS += ',{}'.format(CONFIG.SITE_URL)

Loading…
Cancel
Save