node.js - [GCP][Node] serve [Expressjs] app via HTTPS from GCP Compute Instance
问题描述
I have an express app running on a Google Cloud Platform Compute instance. I would like to serve it via HTTPS. The react app on client side gives me the following:
Mixed Content: The page at 'https://ahv-client.now.sh/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://<GCP COmpute IP>:<PORT>/socket.io/?EIO=3&transport=polling&t=NBgB8QR'. This request has been blocked; the content must be served over HTTPS.
解决方案
推荐阅读
- cocoapods - 无法安装 cocoapods MacBook Air m1
- java - Windows 10 UDP 缓冲区大小/多播接收
- c# - MSB6006“csc.exe”退出代码-1073741819?
- javascript - iOS 上网络中的语音到文本
- flutter - 使用 gitlab 在 Fastlane 中需要帮助(Android 的自动化部署)
- javascript - 未捕获的 SyntaxError:标识符“源”已被声明
- c++ - 如何在不同文件中的命名空间内为函数加好友?
- javascript - 语法荧光笔无法使用带有 Next.js 的 codemirror 2
- javascript - 如何在网站中运行预制的 javascript 文件?
- javascript - 有没有办法从 iframed 网站中删除元素?