你可以在 Azure Web 应用中强制使用 HTTPS 吗?

huangapple go评论94阅读模式
英文:

How can I enforce https in Azure web app?

问题

所有我能找到的文档都显示如何通过转到应用程序 -> TLS/SSL 设置来强制执行 Azure App Service 的 https。然而,Azure Web Apps 上不存在此仪表板,我也没有看到等效的方法来强制重定向。这只能在 web 应用程序代码中完成吗?如果相关,我的应用是 Flask 应用。

注意,我有一个 SSL 证书,https 和 http 都正常工作。我只想在用户通过 http 浏览时强制将其重定向到 https。

编辑:SSL 证书已配置为自定义域。

英文:

All of the documentation I can find shows how to enforce https for Azure App Service by going to app-> TLS/SSL settings. However this dashboard doesn't exist for Azure Web Apps and I don't see an equivalent way to enforce a redirect. Is this something I can only do in the web app code itself? If it's relevant my app is a Flask app.

Note I have an SSL cert and both https and http are working fine. I just want to enforce a redirect to https when a user browses via http.

EDIT: the SSL cert is configured with a custom domain.

答案1

得分: 1

On the WebApp: Settings -> Configuration -> General settings -> HTTPS only

你可以在 Azure Web 应用中强制使用 HTTPS 吗?

英文:

On the WebApp: Settings -> Configuration -> General settings -> HTTPS only
你可以在 Azure Web 应用中强制使用 HTTPS 吗?

huangapple
  • 本文由 发表于 2023年5月22日 00:56:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76300999.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定