gpt4 book ai didi

javascript - 如何使用 createElement 修复 adapt.min.js 文件?当站点使用 SSL 时产生错误

转载 作者:行者123 更新时间:2023-12-01 16:30:09 26 4
gpt4 key购买 nike

我在我的站点中使用 SSL,我有这个错误:

combine.js:6 Mixed Content: The page at 'https://www.******.com/' was loaded over HTTPS, but requested an insecure font 'http://themes.googleusercontent.com/static/fonts/archivonarrow/v3/DsLzC9scoPnrGiwYYMQXpp4t0mJKPaLVqklzZuc32b4.woff'. This request has been blocked; the content must be served over HTTPS.

combine.js:6 Mixed Content: The page at 'https://www.******.com/' was loaded over HTTPS, but requested an insecure font 'http://themes.googleusercontent.com/static/fonts/archivonarrow/v3/M__Wu4PAmHf4YZvQM8tWsHhM4mdXpoxYNWk7Ev34U70.woff'. This request has been blocked; the content must be served over HTTPS.

combine.js:6 Mixed Content: The page at 'https://www.******.com/' was loaded over HTTPS, but requested an insecure font 'http://fonts.gstatic.com/s/montserrat/v6/zhcz-_WihjSQC0oHJ9TCYPk_vArhqVIZ0nv9q090hN8.woff2'. This request has been blocked; the content must be served over HTTPS.

combine.js:6 Mixed Content: The page at 'https://www.******.com/' was loaded over HTTPS, but requested an insecure font 'http://fonts.gstatic.com/s/montserrat/v6/IQHow_FEYlDC4Gzy_m8fcoWiMMZ7xLd792ULpGE4W_Y.woff2'. This request has been blocked; the content must be served over HTTPS.

所有这些错误都来自这一行

!function(a,b,c,d){function m(a,b){l.href=e,f=e,h(a,b)}function n(){clearTimeout(g);var c,h,n,o,p,q,a=b.documentElement?b.documentElement.clientWidth:0,r=k,s=k-1;for(e=d;r--;)if(c=j[r].split("="),h=c[0],q=c[1]?c[1].replace(/\s/g,""):d,p=h.match("to"),n=p?parseInt(h.split("to")[0],10):parseInt(h,10),o=p?parseInt(h.split("to")[1],10):d,!o&&r===s&&a>n||a>n&&o>=a){q&&(e=i+q);break}f?f!==e&&m(r,a):(m(r,a),e&&(b.head||b.getElementsByTagName("head")[0]).appendChild(l))}function o(){clearTimeout(g),g=setTimeout(n,16)}if(c){var e,f,g,h=c.callback||function(){},i=c.path?c.path:"",j=c.range,k=j.length,l=b.createElement("link");l.rel="stylesheet",l.media="screen",n(),c.dynamic&&(a.addEventListener?a.addEventListener("resize",o,!1):a.attachEvent?a.attachEvent("onresize",o):a.onresize=o)}}(this,this.document,ADAPT_CONFIG);

我的网站使用 SSL,并且 url 必须是 https我需要修复它,我对 .js 一无所知,只是我为所有 .js 文件做了合并

我在这里添加错误 adapt.min.js SSL bug如何在 createElement 中使用 https?

最佳答案

如果你看错误您会看到它已因 HTTPS 而损坏。这意味着您不应在调用站点的地方使用 HTTPS。请将 HTTPS 更改为 HTTP 并告诉我您是否遇到其他错误

你可以找到更多关于这个的信息 question

关于javascript - 如何使用 createElement 修复 adapt.min.js 文件?当站点使用 SSL 时产生错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52146239/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com