https页面上的http内容 - 混合内容 [英] http content on a https page - Mixed content

查看:287
本文介绍了https页面上的http内容 - 混合内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我该怎么做。

我有一些https页面,但需要从我的CDN提供商处调用一些http内容。

我想通过http加载的内容是javascript,css和images。

I have some https pages, but need to call in some http content from my CDN provider.
The content I am wanting to load via http is javascript, css and images.

现在这样做时,有些浏览器会发出混合内容警告,并询问是否只显示安全或所有内容。我想做的是绕过这个,并且不发出任何警告,但保留https页面。

Now when doing this at the moment, some browsers give a mixed content warning, and ask if to show just secure or all content. What I would like to do, is get around this, and give no warning, but keep the https page.

我能想到的只有:

创建一个使用cURL或file_get_contents的PHP脚本,并让服务器加载其中的页面。

All I can come up with is:
Make a PHP script that uses cURL or file_get_contents, and get the server to load the page in it.

但问题是它是否使CDN成为可能在https页面上有点兴趣(我当时正在考虑注册和登录),因为它会发送服务器IP,这是英国而不是可能来自美国的访问者。

But the problem with this, is it makes the CDN a bit pointess on https pages (I was thinking signup and login at the moment), as it would send the server IP, which is UK and not the visitor which could be from the USA.

任何人都可以想到混合内容的另一种方式,但是绕过警告,然后再询问每个访问者,更改那些设置,我认为这是不行的。

Can anyone think of another way to mix the content, but get around the warnings, other then asking each visitor, to change there settings, which I think is a no go.

谢谢。

Garry

Thanks.
Garry

推荐答案

如果您想使用CDN,遗憾的是,我需要一个支持HTTPS的。

If you want to use a CDN, you'll need one that supports HTTPS unfortunately.

Google Libraries 提供了许多着名的天秤座里斯(例如jQuery)通过HTTPS。

Google Libraries provides a number of well-known libraries (e.g. jQuery) over HTTPS.

这篇关于https页面上的http内容 - 混合内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆