Google app engine 调用App Engine Flexible Environment API时如何停止混合内容浏览器错误?

Google app engine 调用App Engine Flexible Environment API时如何停止混合内容浏览器错误?,google-app-engine,gunicorn,app-engine-flexible,Google App Engine,Gunicorn,App Engine Flexible,我在浏览器中遇到以下错误: Mixed Content: The page at 'https://{my-site}' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://{my-api}'. This request has been blocked; the content must be served over HTTPS. 我知道我需要允许https做些什么。该应用程序使

我在浏览器中遇到以下错误:

Mixed Content: The page at 'https://{my-site}' was loaded over HTTPS, but 
requested an insecure XMLHttpRequest endpoint 'http://{my-api}'. This request 
has been blocked; the content must be served over HTTPS.
我知道我需要允许https做些什么。该应用程序使用Gunicorn在定制的Google App Engine灵活环境中运行该应用程序。它也使用烧瓶。这是我的app.yaml:

runtime: custom
env: flex
service: flex-module
entrypoint: gunicorn -b :$PORT main:app
是否可以更改可扩展服务代理中的某些设置以允许应用程序引擎中的https?或者我需要获取ssl证书和密钥并将以下内容添加到我的app.yaml中:

gunicorn -w3 --certfile=server.crt --keyfile=server.key test:app
此外,我不确定是否需要将其添加到
gunicorn.conf.py
中,如:

感谢

如中所述,谷歌不会为appspot.com上托管的双通配符域颁发SSL证书:

注意:谷歌建议使用HTTPS协议向你的应用发送请求。谷歌不会为托管在appspot.com上的双通配符域颁发SSL证书。因此,HTTPS请求必须使用字符串“-dot-”作为URL符号,而不是“.”来分隔子域。您可以对自己的自定义域和其他HTTP地址使用简单的“.”URL符号。有关更多信息,请参阅以下部分中的HTTP和HTTPS示例


因此,允许通过https进行API请求,并避免混合内容浏览器错误,而不是
http://version-one.my-app.appspot.com
我需要将请求发送到:
https://version-one-dot-my-app.appspot.com

要拨打HTTPS电话,通过将以下配置添加到app.yaml文件,为您的应用启用ssl库:

libraries:
  • 名称:ssl 版本:最新

libraries: