Tag/version of Container Images
0.4.5
Bug
services:
web:
environment:
- DJANGO_ALLOWED_HOSTS=host1.example.com,host2.example.com
results in error `Invalid HTTP_HOST header: 'host1.example.com'. You may need to add 'host1.example.com' to ALLOWED_HOSTS.
Reason
In \opt\mailman-web\settings.py
ALLOWED_HOSTS = [
"localhost", # Archiving API from Mailman, keep it.
# "lists.your-domain.org",
# Add here all production URLs you may have.
"mailman-web",
gethostbyname("mailman-web"),
os.environ.get('SERVE_FROM_DOMAIN'),
os.environ.get('DJANGO_ALLOWED_HOSTS'),
]
reads the env var as a string (instead of parsing a comma-separated list), which mangles the array ALLOWED_HOSTS:
['localhost',
'mailman-web',
'192.168.64.4',
'host1.example.com',
'host1.example.com,host2.example.com']
Workaround
Override in settings_local.py:
ALLOWED_HOSTS = ['localhost','mailman-web','host1.example.com','host2.example.com']
Tag/version of Container Images
0.4.5
Bug
results in error `Invalid HTTP_HOST header: 'host1.example.com'. You may need to add 'host1.example.com' to ALLOWED_HOSTS.
Reason
In
\opt\mailman-web\settings.pyreads the env var as a string (instead of parsing a comma-separated list), which mangles the array
ALLOWED_HOSTS:Workaround
Override in
settings_local.py: