• https页面打开http阻挡问题 IT


    问题如下

    <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页面
    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/
    #前端
    		location  ^~ /center-ui/{
    			proxy_pass  http://4.4.4.4:9093/center-ui/;
                   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;
              }

      配置好后跳转完美解决

     


  • 相关阅读:
    如何删除.DS_Store文件?
    STL 技巧整理 7/22
    贪心
    防线
    bfs&dfs模板
    并查集学习总结
    二叉树相关代码
    区间DP学习笔记
    多算法模板整理
    防线题解
  • 原文地址:https://www.cnblogs.com/qxqbk/p/16359657.html
Copyright © 2020-2023  润新知