是否可以从HTTPS到HTTP进行JSONP请求

是否可以从HTTPS到HTTP进行JSONP请求

本文介绍了是否可以从HTTPS到HTTP进行JSONP请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有一个几乎重复的问题,但答案是不令人满意。



我需要使用通过HTTP运行的Openstreetmap服务进行地理编码。



我的网站通过HTTPS运行。



似乎不可能从https到http,浏览器

解决方案

任何解决方案都可能导致不安全的内容。





您可以在安全网站中设置代理页面,请求不安全内容。在您发送到浏览器之前,您应该验证内容,以确保内容实际上是安全的,而不仅仅是假装是安全的。


I know there is an almost duplicate question, but the answer is not satisfactory at all.

I need to do geocoding using the Openstreetmap service which runs over HTTP.

My site runs over HTTPS.

It seems impossible to do JSONP request from https to http, browser (Chrome) complains about insecure content.

Any solutions?

解决方案

The reason that the browser complains about insecure content is that the content is insecure. The entire purpose with a secure page is that all of it is secure, and can be trusted.

You can set up a proxy page in your secure site that requests the insecure content. There you should verify the content before it's sent to the browser, so that it is actually secure, not just pretending to be secure.

这篇关于是否可以从HTTPS到HTTP进行JSONP请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 02:13