Browse Source

SSL stuff.

master
Nick Sergeant 5 years ago
parent
commit
9b72236aa3
2 changed files with 2 additions and 1 deletions
  1. +2
    -0
      settings.py
  2. +0
    -1
      settings_local.py-template

+ 2
- 0
settings.py View File

@@ -36,6 +36,7 @@ ALLOWED_HOSTS = ['*']
AUTH_PROFILE_MODULE = 'accounts.UserProfile'
AUTHENTICATION_BACKENDS = ('utils.backends.EmailOrUsernameModelBackend',)
BASE_PATH = os.path.dirname(__file__)
CSRF_COOKIE_SECURE = True if 'USE_SSL' in os.environ else False
DEBUG = True if 'DEBUG' in os.environ else False
DEFAULT_FROM_EMAIL = os.environ.get('POSTMARK_EMAIL', 'support@snipt.net')
EMAIL_BACKEND = 'postmark.django_backend.EmailBackend'
@@ -64,6 +65,7 @@ REGISTRATION_EMAIL_HTML = False
ROOT_URLCONF = 'urls'
SECRET_KEY = os.environ.get('SECRET_KEY', 'changeme')
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True if 'USE_SSL' in os.environ else False
SEND_BROKEN_LINK_EMAILS = False
SERVER_EMAIL = os.environ.get('POSTMARK_EMAIL', 'support@snipt.net')
SESSION_COOKIE_AGE = 15801100


+ 0
- 1
settings_local.py-template View File

@@ -3,7 +3,6 @@ DEBUG = True
POSTMARK_API_KEY = ''
SECRET_KEY = 'changeme'
SESSION_COOKIE_SECURE = False
SSLIFY_DISABLE = False
STRIPE_SECRET_KEY = ''
USE_HTTPS = False



Loading…
Cancel
Save