mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01: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
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
import os
|
||||
|
||||
DEFAULT_USER_SETTINGS = {
|
||||
'login_view_ticketlist': True,
|
||||
@ -22,6 +23,13 @@ except AttributeError:
|
||||
|
||||
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 #
|
||||
##########################################
|
||||
|
Loading…
Reference in New Issue
Block a user