Restrict allowed hosts + switch DEBUG to false in prod

This commit is contained in:
Gabriel Augendre 2018-03-05 22:16:45 +01:00
parent eb68228278
commit e3cf1c0e75
No known key found for this signature in database
GPG key ID: F360212F958357D4

View file

@ -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