【问题标题】:Google App Engine/ Custom Domain - Preferring https over httpGoogle App Engine/自定义域 - 首选 https 而不是 http
【发布时间】:2020-07-16 23:59:40
【问题描述】:

我在 Google 的 App Engine (flex) 上部署了一个 App Engine 应用,它被映射到一个自定义域,即 example.com。当我访问 example.com 的裸域时,我被引导到http://example.com。但是,有一个 https://example.com 正在运行。该应用程序是一个反应前端,节点/快递后端。有什么方法可以将所有传入的请求重定向到 https 站点,甚至删除该站点的 http 版本?

【问题讨论】:

    标签: node.js reactjs google-app-engine google-cloud-platform dns


    【解决方案1】:

    是的,app.yaml 中的 secure 指令:

    - url: /.*
      script: auto
      secure: always
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-10
      • 2017-04-08
      • 2014-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多