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 > } |
配置好后跳转完美解决
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 提示词工程——AI应用必不可少的技术
· 地球OL攻略 —— 某应届生求职总结
· 字符编码:从基础到乱码解决
· SpringCloud带你走进微服务的世界