settings: Set an intelligent default for ALLOWED_HOSTS.

This commit is contained in:
Tim Abbott 2016-09-28 20:53:13 -07:00
parent f3ee0eb67b
commit c65820618f
3 changed files with 1 additions and 5 deletions

View File

@ -89,9 +89,6 @@ These settings include:
your configuration using `manage.py send_test_email` to confirm
your outgoing email configuration is working correctly.
- `ALLOWED_HOSTS`: Replace `*` with the fully qualified DNS name for
your Zulip server here.
## Step 4: Initialize Zulip database
At this point, you are done doing things as root. To initialize the

View File

@ -111,7 +111,7 @@ NOREPLY_EMAIL_ADDRESS = "noreply@example.com"
# header. See Django's documentation here:
# <https://docs.djangoproject.com/en/1.9/ref/settings/#allowed-hosts>.
# Zulip adds 'localhost' to the list automatically.
ALLOWED_HOSTS = ['zulip.example.com']
ALLOWED_HOSTS = [EXTERNAL_HOST]
### OPTIONAL SETTINGS

View File

@ -212,7 +212,6 @@ REQUIRED_SETTINGS = [("EXTERNAL_HOST", "zulip.example.com"),
("AUTHENTICATION_BACKENDS", ()),
("NOREPLY_EMAIL_ADDRESS", "noreply@example.com"),
("DEFAULT_FROM_EMAIL", "Zulip <zulip@example.com>"),
("ALLOWED_HOSTS", ['zulip.example.com', '127.0.0.1', 'localhost']),
]
if ADMINS == "":