更新:
Mixed Content: The page at 'https://myapp.herokuapp.com/#/employees' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://api.geonames.org/countryInfoJSON?username=design1online'. This request has been blocked; the content must be served over HTTPS.
我试图从我在 heroku 中的一个应用程序调用以下 api,但出现以下错误
我需要附加 SSL 吗?
我什至在没有 http:
的情况下尝试过这样的事情:
//api.geonames.org/countryInfoJSON?username=design1online
API 调用:
http://api.geonames.org/countryInfoJSON?username=design1online
错误:
failed to load resource: net::err_ssl_protocol_error
最佳答案
将 S 添加到 http 标签实际上对我有用,我今天刚遇到这个问题
<script src="https://maps.googleapis.com/maps/api/js?region=GB"></script>
关于api - Heroku:已通过 HTTPS 加载,但请求了不安全的 XMLHttpRequest - 请求已被阻止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29112750/