随笔 - 144  文章 - 0  评论 - 2  阅读 - 92190

https页面打开http阻挡问题

问题如下

<iframe
:src="srcUrl"
frameborder="0"
width="100%"
height="100%"
allowfullscreen="true"
></iframe>

async beforeOpen(){
await officeToOfd(this.value.fileId).then(res=>{
if("0"==res){
this.$Message.warning('XXXXXXXXXX');
this.$refs['ModalOperator'].close()
}else{
this.srcUrl=https://1.1.1.1:33563/aaa/web/reader?file=res;
    }
})
},

通过nginx反向代理跳转到http页面
1
2
3
4
5
6
7
location  ^~ /aaa/{
            proxy_pass  http://2.2.2.2/;
            proxy_cookie_path /center-ui /;
            proxy_set_header   Host    $host;
            proxy_set_header   X-Real-IP   $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        }
https://3.3.3.3:33563/center-ui/api/file/
1
2
3
#前端
        location  ^~ /center-ui/{
            proxy_pass  http://4.4.4.4:9093/center-ui/;<br>               proxy_cookie_path /center-ui /; <br>               proxy_set_header Host $host; <br>               proxy_set_header X-Real-IP $remote_addr; <br>               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; <br>          }

  配置好后跳转完美解决

 


posted on   IT-QI  阅读(568)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 提示词工程——AI应用必不可少的技术
· 地球OL攻略 —— 某应届生求职总结
· 字符编码:从基础到乱码解决
· SpringCloud带你走进微服务的世界
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示