我制作了一个使用 p5.js 的天气预报网络应用程序。它在我的本地主机上完美运行。为什么这个问题不断出现在 github 页面上:
Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ''. This request has been blocked; the content must be served over HTTPS.
最佳答案
问题在于 GitHub 页面正在加载使用 http
连接而不是所需的 https
连接的 API 请求。尝试通过安全连接访问 API 服务器,它应该可以工作。
关于javascript - OpenWeather API 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52343365/