gpt4 book ai didi

https - 将 Google 域设置为使用 https

转载 作者:行者123 更新时间:2023-12-04 23:13:21 24 4
gpt4 key购买 nike

我从 Google 购买了一个域(例如 example.com ),我的 Django 应用程序(例如 mysite.herokuapp.com )在 Heroku 上运行。 CNAME 在 Google 上设置为将 http 请求转发到 Heroku 上的 Django 应用程序。转发来自 http://mysite.example.com 的请求至mysite.herokuapp.com工作得很好。

最近需要介绍progressive-web-application到我的应用程序,它需要 https协议(protocol),而不是 http ,也就是说,现在的 URL 必须是 https://mysite.example.com它不适用于 Google 域。我试过https://mysite.herokuapp.com它工作正常,这意味着 Heroku 已经支持 https .但是,我尝试了很长时间(也用谷歌搜索了),但没有找到解决方案。

那么如何设置 Google 域以使用 https协议(protocol)?

最佳答案

来自 Google 的 DNS 答案不能包含端口或协议(protocol)(http 与 https),它只包含主机名。

您需要在 Heroku django 应用程序中添加从 http 到 https 的重定向,参见例如here了解更多说明。

关于https - 将 Google 域设置为使用 https,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49494266/

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