gpt4 book ai didi

google-app-engine - 如何禁用 AppEngine HTTP 端点

转载 作者:行者123 更新时间:2023-12-03 21:20:37 25 4
gpt4 key购买 nike

我看到我的 AppEngine 端点同时监听 HTTP 和 HTTPS,如何禁用 HTTP 端点?

  • http://project-id.appspot.com - 我想禁用它。
  • https://project-id.appspot.com
  • 最佳答案

    您不能完全禁用它,但您可以强制重定向到 HTTPS。

    如果端点在标准环境中运行,您只需要设置 secure: always app.yaml 中各个处理程序的配置配置文件:

    always

    Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are preserved for the redirect.



    如果是在灵活的环境中,事情会稍微复杂一些,请遵循此线程: Force SSL on App Engine Flexible Environment Custom Runtime

    关于google-app-engine - 如何禁用 AppEngine HTTP 端点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54444056/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com