Node.js 我无法为我的Google应用程序引擎禁用http请求

Node.js 我无法为我的Google应用程序引擎禁用http请求,node.js,google-app-engine,ssl,https,Node.js,Google App Engine,Ssl,Https,我创建了一个Nodejs/expressapi应用程序,并上传到googleappengine 它很好用 但它接受HTTP不安全请求和HTTPS 我尝试使用以下配置禁用HTTP请求: // app.yaml runtime: nodejs env: flex handlers: - url: /.* secure: always redirect_http_response_code: 301 script: auto 即使在新的项目上传之后,它仍然接受HTTP请求,而不是重定

我创建了一个Nodejs/expressapi应用程序,并上传到googleappengine

它很好用

但它接受HTTP不安全请求和HTTPS

我尝试使用以下配置禁用HTTP请求:

// app.yaml

runtime: nodejs
env: flex

handlers:
- url: /.*
  secure: always
  redirect_http_response_code: 301
  script: auto
即使在新的项目上传之后,它仍然接受HTTP请求,而不是重定向到HTTPS

我做错了什么


我不想使用自定义域,只想使用my project.appspot.com。

App Engine Flexible不支持使用App.yaml文件中所述的安全和重定向\u http\u响应\u代码等选项

我的建议是将您必须的应用程序移动到标准环境中,该环境现在支持Node并具有您想要使用的这些功能,或者在代码中手动执行重定向