From e3cf1c0e7555efb991bce02f679f5579691e711d Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Mon, 5 Mar 2018 22:16:45 +0100 Subject: [PATCH] Restrict allowed hosts + switch DEBUG to false in prod --- workout/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workout/settings.py b/workout/settings.py index 87b9f06..0b17734 100644 --- a/workout/settings.py +++ b/workout/settings.py @@ -24,9 +24,9 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'x*8q7sd14&a%cu95$h@jl&&#bb&j(j*-6h5!3atz*v%!zo3hd4' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = os.getenv('DJANGO_ENV', 'prod') == 'dev' -ALLOWED_HOSTS = ['*'] +ALLOWED_HOSTS = ['localhost', 'workout.augendre.info', 'web', 'workout', 'workout-web'] # Application definition