About https pages using iframe to nest http pages

Today we encountered a new demand. Our company's protocol is https, and we want to display an http page - jump to the OA page (this page must be displayed). I thought it was very simple, just an iframe. Isn't it very simple? Just nest it in.

The problem really started running perfectly locally from here, and it was solved. Package it and upload it to the test environment. Boom, blank page. My mind is blank. Is it necessary to dynamically set the width and height? It is useless after setting it.

Insert image description here

1. I found a way to add a line of code to the page that needs to cross domain: (doesn’t work for me)

   <iframe :src="linkurlQW" frameborder="0" id="content"></iframe> //frame 地址

 <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">//添加meta 

2. window.location.href = url (can be opened)

 window.location.href;//当前页面打开 URL 页

Guess you like

Origin blog.csdn.net/sinat_52319736/article/details/127384699