• 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;
              }

      配置好后跳转完美解决

     


  • 相关阅读:
    Python下用Tkinter进行GUI编程
    6月3日——回首一个半月
    Consistent Hashing算法
    学生终究要面对社会
    MySQL的锁(1)
    Memcached笔记之分布式算法(idv2.com)
    4月21日总结
    2012.3.29小结
    C#调用c++创建的dll
    以post方式发送文档到端口
  • 原文地址:https://www.cnblogs.com/qxqbk/p/16359657.html
Copyright © 2020-2023  润新知