Skip to content
Snippets Groups Projects
Commit 53001150 authored by Eduardo Klosowski's avatar Eduardo Klosowski
Browse files

Define SECRET_KEY padrão apenas se o aplicativo estiver em DEBUG

parent 6a849ddc
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -22,12 +22,14 @@ PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
 
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get('SECRET_KEY') or '{{ secret_key }}'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = get_env_bool('DEBUG')
 
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get('SECRET_KEY')
if not SECRET_KEY and DEBUG:
SECRET_KEY = '{{ secret_key }}'
ALLOWED_HOSTS = [host for host in os.environ.get('ALLOWED_HOSTS', '').split(':') if host] or ['*']
 
# Honor the 'X-Forwarded-Proto' header for request.is_secure()
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment