瀏覽代碼

HUE-4498 [security] Fixed Content Security Policy blocks PDF in HBase app

Prakash Ranade 9 年之前
父節點
當前提交
f00d088
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      desktop/conf.dist/hue.ini
  2. 1 1
      desktop/conf/pseudo-distributed.ini.tmpl
  3. 1 1
      desktop/core/src/desktop/conf.py

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

@@ -91,7 +91,7 @@
   ## secure_browser_xss_filter=true
 
   # X-Content-Type-Options: nosniff This is a HTTP response header feature that helps prevent attacks based on MIME-type confusion.
-  ## secure_content_security_policy="script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.doubleclick.net *.mathjax.org data:;img-src 'self' *.google-analytics.com *.doubleclick.net *.tile.osm.org data:;style-src 'self' 'unsafe-inline';connect-src 'self';child-src 'none';object-src 'none'"
+  ## secure_content_security_policy="script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.doubleclick.net *.mathjax.org data:;img-src 'self' *.google-analytics.com *.doubleclick.net *.tile.osm.org data:;style-src 'self' 'unsafe-inline';connect-src 'self';child-src 'self' data:;object-src 'none'"
 
   # Strict-Transport-Security HTTP Strict Transport Security(HSTS) is a policy which is communicated by the server to the user agent via HTTP response header field name “Strict-Transport-Security”. HSTS policy specifies a period of time during which the user agent(browser) should only access the server in a secure fashion(https).
   ## secure_ssl_redirect=False

+ 1 - 1
desktop/conf/pseudo-distributed.ini.tmpl

@@ -95,7 +95,7 @@
   ## secure_browser_xss_filter=true
 
   # X-Content-Type-Options: nosniff This is a HTTP response header feature that helps prevent attacks based on MIME-type confusion.
-  ## secure_content_security_policy="script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.doubleclick.net *.mathjax.org data:;img-src 'self' *.google-analytics.com *.doubleclick.net *.tile.osm.org data:;style-src 'self' 'unsafe-inline';connect-src 'self';child-src 'none';object-src 'none'"
+  ## secure_content_security_policy="script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.doubleclick.net *.mathjax.org data:;img-src 'self' *.google-analytics.com *.doubleclick.net *.tile.osm.org data:;style-src 'self' 'unsafe-inline';connect-src 'self';child-src 'self' data:;object-src 'none'"
 
   # Strict-Transport-Security HTTP Strict Transport Security(HSTS) is a policy which is communicated by the server to the user agent via HTTP response header field name “Strict-Transport-Security”. HSTS policy specifies a period of time during which the user agent(browser) should only access the server in a secure fashion(https).
   ## secure_ssl_redirect=False

+ 1 - 1
desktop/core/src/desktop/conf.py

@@ -197,7 +197,7 @@ SECURE_CONTENT_SECURITY_POLICY = Config(
           "img-src 'self' *.google-analytics.com *.doubleclick.net *.tile.osm.org data:;"+
           "style-src 'self' 'unsafe-inline';"+
           "connect-src 'self';"+
-          "child-src 'none';"+
+          "child-src 'self' data:;"+
           "object-src 'none'")
 
 SECURE_SSL_REDIRECT = Config(