1.8版本配置https后,在仪表盘中有几个接口请求的路径还是http,导致请求混用
版本号:
1.8
问题描述:
1.8版本配置https后,在仪表盘中有几个接口请求的路径还是http,导致请求混用
错误日志&截图:

重现步骤:
友情提示(为了提高issue处理效率):
- 积木报表是一款免费报表产品,功能免费源码不开放;
- 未按格式要求发帖,会被直接删掉;
- 请针对问题提供[报表设计配置或SQL脚本]或在官网制作报表示例并提供ID;
- 针对不好重现的问题,请录制操作视频或详细的重现步骤;
南方小火人
着急帮忙看下
参考修改nginx配置: https://blog.csdn.net/weixin_34376986/article/details/89767950
改了下nginx的配置还是不行,nginx配置如下:
仪表盘设计里面的组件还是出不来,如下图:
报表url是:https://xxxxx/drag/index?pageId=990784598098268160 仪表盘设计的时候左边的组件出不来,访问的地址是http的: http://xxxxx/drag/page/queryById?id=990784598098268160 http://xxxxx/drag/comp/treeList?excludeComp= http://xxxxx/drag/onlDragDatasetHead/getLoginUser http://xxxxx/drag/page/getCount
你也没有配置 proxy_set_header X-Forwarded-Proto $scheme;呀
大佬,配置了也还是不行,帮忙看看,nginx配置如下: location /jmreport/ { proxy_set_header Host $host; proxy_set_header X-real-ip $remote_addr; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://up_jmreport/jmreport/; }
location /drag/ {
proxy_set_header Host $host;
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://up_jmreport/drag/;
}
location / {
proxy_set_header Host $host;
proxy_redirect off;
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Scheme $scheme;
proxy_pass http://up_jmreport;
}
是不是你前端是https的 后端是http的 导致,如果的是话,需要将后台也改成https
不是的,我是用源码部署的积木报表,然后给他配置了https,去访问仪表盘设计器,设计的时候左边的组件列表出不来,看获取组件的接口是http的,不是https,是不是项目里面组件获取那块拿路径有点问题
?
就是用hppts访问积木报表的仪表盘的设计器,设计报表的时候左边的组件出不来: 仪表盘在线设计器报表url是:https://xxxxx/drag/index?pageId=990784598098268160 仪表盘在线设计器设计报表的时候左边的组件出不来,访问的地址是http的: http://xxxxx/drag/page/queryById?id=990784598098268160 http://xxxxx/drag/comp/treeList?excludeComp= http://xxxxx/drag/onlDragDatasetHead/getLoginUser http://xxxxx/drag/page/getCount
F12看了下有4个接口访问的路径不是https,这4个接口应该也要是https的路径才对吧
http://boot3.jeecg.com/dashboard/analysis 演示环境没问题
用http的是没有问题,用https的才会有问题
仪表盘访问地址就是https
你的配置 proxy_pass http://up_jmreport; getScheme()会取到http
nginx 配置下面两个选一个
配置X_GATEWAY_BASE_PATH 如: proxy_set_header X_GATEWAY_BASE_PATH /; (这样就会继承前端页面的host)
配置 X-Forwarded-Scheme 为https .
如下: proxy_set_header X-Forwarded-Scheme https;
改变的起始就是这里的domianURL
参考这个