【发布时间】:2020-08-26 08:40:09
【问题描述】:
我使用 Angular 模板创建了一个 .net 核心项目。我只想使用 https(或至少将所有 http 重定向到 https),但是当初始请求是 http 时,我不知道如何将 angular 应用程序重定向到 https。我正在使用 docker 通过 Heroku 进行托管。
当我在我的域名前指定 https:// 时,可以使用 https。
SSL 由 Heroku 自动设置。
我什至尝试使用拦截器检查 Heroku 文档中指定的标头并将 window.location.href 更改为 https,但一个不起作用,两个看起来像 hack。
【问题讨论】:
标签: angular heroku .net-core https