瀏覽代碼

Split allowed hosts by comma

Jake Howard 2 年之前
父節點
當前提交
8fc1330056
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      bakerydemo/settings/production.py

+ 1 - 4
bakerydemo/settings/production.py

@@ -23,13 +23,10 @@ else:
 # Make sure Django can detect a secure connection properly on Heroku:
 SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
 
-# Redirect all requests to HTTPS
-SECURE_SSL_REDIRECT = os.getenv("DJANGO_SECURE_SSL_REDIRECT", "off") == "on"
-
 # Accept all hostnames, since we don't know in advance which hostname will be used for any given Heroku instance.
 # IMPORTANT: Set this to a real hostname when using this in production!
 # See https://docs.djangoproject.com/en/3.2/ref/settings/#allowed-hosts
-ALLOWED_HOSTS = os.getenv("DJANGO_ALLOWED_HOSTS", "*").split(";")
+ALLOWED_HOSTS = os.getenv("DJANGO_ALLOWED_HOSTS", "*").split(",")
 
 EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"