Skip to content

Commit

Permalink
HUE-2072 [core] Updating Proxy SSL support to be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
l1x authored and romainr committed Apr 17, 2014
1 parent b69811f commit b293f95
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions desktop/conf.dist/hue.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
# Help improve Hue with anonymous usage analytics.
# Use Google Analytics to see how many times an application or specific section of an application is used, nothing more.
## collect_usage=true

# SECURE_PROXY_SSL_HEADER support for HTTPS termination at the load-balancer level
## SECURE_PROXY_SSL_HEADER=true

# Comma-separated list of Django middleware classes to use.
# See https://docs.djangoproject.com/en/1.4/ref/middleware/ for more details on middlewares in Django.
Expand Down
6 changes: 5 additions & 1 deletion desktop/conf/pseudo-distributed.ini.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@
# Help improve Hue with anonymous usage analytics.
# Use Google Analytics to see how many times an application or specific section of an application is used, nothing more.
## collect_usage=true


# SECURE_PROXY_SSL_HEADER support for HTTPS termination at the load-balancer level
## SECURE_PROXY_SSL_HEADER=true


# Comma-separated list of Django middleware classes to use.
# See https://docs.djangoproject.com/en/1.4/ref/middleware/ for more details on middlewares in Django.
## middleware=desktop.auth.backend.LdapSynchronizationBackend
Expand Down
3 changes: 2 additions & 1 deletion desktop/core/src/desktop/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@
MIDDLEWARE_CLASSES.append('desktop.middleware.EnsureSafeRedirectURLMiddleware')

#Support HTTPS load-balancing
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')
if desktop.conf.SECURE_PROXY_SSL_HEADER.get():
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTOCOL', 'https')

############################################################

Expand Down

0 comments on commit b293f95

Please sign in to comment.