superset config https

1.superset版本为2.8.1安装后用http访问都可以,启动脚本为:
gunicorn -w 4 --timeout 100 -b ip:port --limit-request-line 0 --limit-request-field_size 0 --forwarded-allow-ips="" superset:app,启动后也能正常的访问。但是当用inframe把superset嵌入的时候就出问题了。服务是用https来链接的,而superset的服务是一个http服务,根据同源同域的原理,https的访问不能返回http的response,否则会出现类似于:This request has been blocked; the content must be served over HTTPS.
关于解决方式有如下的链接,可能对于不同的服务:
https://github.com/apache/incubator-superset/issues/978
https://github.com/apache/incubator-superset/issues/6379
https://github.com/apache/incubator-superset/issues/978
2.我的解决方式就是:把gunicore开的http服务变成https服务,启动命令为:
gunicorn -w 2 --timeout 100 -b 10.80.223.181:18081 --certfile=server.crt --keyfile=server.key --limit-request-line 0 --limit-request-field_size 0 --forwarded-allow-ips="
" superset:app
server.crt和server.key是ssl的验证文件,这个文件配上就好了,因为我们公司是内网访问,所以需要运维用slb上把http的代理转成https的代理。生效之前报:get 502 bad gateway,当这个代理配置生效后就可以正常的访问了

你可能感兴趣的:(superset,superset,issue)