英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论