简体   繁体   English

Node.js HTTPS jQuery无法正常工作

[英]Node.js HTTPS jquery not working

When my NodeJS server was running with HTTP, any client-side jQuery script from google's API worked well. 当我的NodeJS服务器运行HTTP时,谷歌API的任何客户端jQuery脚本都可以正常工作。 But I changed all requests to HTTPS with a self-signed certificate, and after that my static CSS files still work, but Jquery doesn't. 但是我使用自签名证书将所有请求更改为HTTPS,此后,我的静态CSS文件仍然有效,但Jquery无效。 Is there a reason why this happens? 为什么会发生这种情况?

Answering my own question. 回答我自己的问题。

The API scripts google Distributes comes in both http and https links. google Distributes的API脚本包含在http和https链接中。 I found out that to use these scripts, you have to also access these external scripts through HTTPS. 我发现要使用这些脚本,还必须通过HTTPS访问这些外部脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM