Introduce some creative code around setting of ALLOWED_HOSTS that defaults to ['*'].  Also added PAPERLESS_ALLOWED_HOSTS to paperless.conf.example with an explanation as to what it's for
This commit is contained in:
Daniel Quinn
2017-01-03 09:52:31 +00:00
parent 350d2fb747
commit 7b586e6857
4 changed files with 21 additions and 2 deletions

View File

@@ -29,7 +29,11 @@ DEBUG = True
LOGIN_URL = '/admin/login'
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["*"]
_allowed_hosts = os.getenv("PAPERLESS_ALLOWED_HOSTS")
if _allowed_hosts:
ALLOWED_HOSTS = _allowed_hosts.split(",")
# Tap paperless.conf if it's available
if os.path.exists("/etc/paperless.conf"):

View File

@@ -1 +1 @@
__version__ = (0, 3, 1)
__version__ = (0, 3, 2)