我在Nodejs环境中在谷歌 Cloud 上部署了一个站点 . 我想将用户从http重定向到https,因为我想将https作为默认值 . 我已经在App引擎中附加了我的自定义域的SSL证书,它工作正常 . 我还尝试从节点重定向到https,但没有人在谷歌 Cloud 上工作 .
如果事情不起作用,我对 Cloud 知之甚少,那么我必须迁移到Heroku .
你必须在 app.yaml 中设置它
app.yaml
handlers: - url: /.* script: IGNORED secure: always
见https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml#security
1 回答
你必须在
app.yaml
中设置它见https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml#security