mirror of https://github.com/jumpserver/jumpserver
fix: 优化替换 DOMAINS 中端口 的问题
parent
1734ddc2bd
commit
6d2a62e413
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import platform
|
||||
import re
|
||||
|
||||
from redis.sentinel import SentinelManagedSSLConnection
|
||||
|
||||
|
@ -79,8 +80,8 @@ 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]
|
||||
ALLOWED_DOMAINS = [re.sub(':80$|:443$', '', host) for host in ALLOWED_DOMAINS]
|
||||
|
||||
DEBUG_HOSTS = ('127.0.0.1', 'localhost', 'core')
|
||||
DEBUG_PORT = ['8080', '80', ]
|
||||
|
|
Loading…
Reference in New Issue