Force ssl
This commit is contained in:
parent
d9242181c8
commit
df10c67999
2 changed files with 11 additions and 9 deletions
|
@ -24,19 +24,20 @@ ALLOWED_HOSTS = ['*']
|
|||
# Application definition
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.staticfiles',
|
||||
'app',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.staticfiles',
|
||||
'app',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'sslify.middleware.SSLifyMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
)
|
||||
|
||||
TEMPLATE_DIRS = (
|
||||
os.path.join(BASE_DIR, 'app/templates'),
|
||||
os.path.join(BASE_DIR, 'app/templates'),
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'project.urls'
|
||||
|
@ -50,7 +51,7 @@ SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
|||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': dj_database_url.config()
|
||||
'default': dj_database_url.config()
|
||||
}
|
||||
|
||||
# Internationalization
|
||||
|
@ -73,5 +74,5 @@ STATIC_ROOT = 'staticfiles'
|
|||
STATIC_URL = '/static/'
|
||||
|
||||
STATICFILES_DIRS = (
|
||||
os.path.join(BASE_DIR, 'static'),
|
||||
os.path.join(BASE_DIR, 'static'),
|
||||
)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
dj-database-url==0.3.0
|
||||
dj-static==0.0.6
|
||||
Django==1.7.3
|
||||
django-sslify==0.2.5
|
||||
django-toolbelt==0.0.1
|
||||
gunicorn==19.1.1
|
||||
psycopg2==2.5.4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue