浏览代码

HUE-2072 [core] Disable SSL proxy header by default

Add option in desktop/conf.py
Cleanup comments.
Romain Rigaux 11 年之前
父节点
当前提交
8af30e0f69
共有 3 个文件被更改,包括 12 次插入7 次删除
  1. 2 2
      desktop/conf.dist/hue.ini
  2. 4 5
      desktop/conf/pseudo-distributed.ini.tmpl
  3. 6 0
      desktop/core/src/desktop/conf.py

+ 2 - 2
desktop/conf.dist/hue.ini

@@ -70,8 +70,8 @@
   # 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
+  # Support for HTTPS termination at the load-balancer level with SECURE_PROXY_SSL_HEADER.
+  ## secure_proxy_ssl_header=false
 
   # 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.

+ 4 - 5
desktop/conf/pseudo-distributed.ini.tmpl

@@ -78,11 +78,10 @@
   # 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
-  
-  
+
+  # Support for HTTPS termination at the load-balancer level with SECURE_PROXY_SSL_HEADER.
+  ## secure_proxy_ssl_header=false
+
   # 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

+ 6 - 0
desktop/core/src/desktop/conf.py

@@ -134,6 +134,12 @@ REDIRECT_WHITELIST = Config(
   type=list_of_compiled_res(skip_empty=True),
   default='')
 
+SECURE_PROXY_SSL_HEADER = Config(
+  key="secure_proxy_ssl_header",
+  help=_("Support for HTTPS termination at the load-balancer level with SECURE_PROXY_SSL_HEADER."),
+  type=coerce_bool,
+  default=False)
+
 APP_BLACKLIST = Config(
   key='app_blacklist',
   default='',