mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-21 10:08:17 +02:00
Turn on secure cookie support if the server os environment expects to use secure connections
This commit is contained in:
parent
e8efa4d263
commit
166d552fba
@ -5,6 +5,7 @@ Default settings for django-helpdesk.
|
|||||||
import warnings
|
import warnings
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
import os
|
||||||
|
|
||||||
DEFAULT_USER_SETTINGS = {
|
DEFAULT_USER_SETTINGS = {
|
||||||
'login_view_ticketlist': True,
|
'login_view_ticketlist': True,
|
||||||
@ -22,6 +23,13 @@ except AttributeError:
|
|||||||
|
|
||||||
HAS_TAG_SUPPORT = False
|
HAS_TAG_SUPPORT = False
|
||||||
|
|
||||||
|
# check for secure cookie support
|
||||||
|
if os.environ.get('SECURE_PROXY_SSL_HEADER'):
|
||||||
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
|
||||||
|
|
||||||
|
SESSION_COOKIE_SECURE = True
|
||||||
|
CSRF_COOKIE_SECURE = True
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# generic options - visible on all pages #
|
# generic options - visible on all pages #
|
||||||
##########################################
|
##########################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user