We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df7bb47 commit 06e6068Copy full SHA for 06e6068
controller/settings.py
@@ -26,13 +26,18 @@
26
# SECURITY WARNING: don't run with debug turned on in production!
27
DEBUG = os.getenv("ENV", "production") != "production"
28
TESTING = sys.argv[1:2] == ["test"] or os.getenv("TESTING")
29
-ALLOWED_HOSTS = ["*"]
30
31
STATIC_URL = os.getenv("STATIC_URL", "/assets/static/")
32
MEDIA_URL = os.getenv("MEDIA_URL", "/assets/media/")
33
STATIC_ROOT = os.path.join(BASE_DIR, "assets/static")
34
MEDIA_ROOT = os.path.join(BASE_DIR, "assets/media")
35
+if not DEBUG:
36
+ ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "").split(",")
37
+ CSRF_TRUSTED_ORIGINS = os.getenv("CSRF_TRUSTED_ORIGINS", "").split(",")
38
+else:
39
+ ALLOWED_HOSTS = ["*"]
40
+
41
# Application definition
42
43
INSTALLED_APPS = [
0 commit comments