Azure Functions: Force HTTPS

核能气质少年 提交于 2020-01-21 01:37:28

问题


Is there a way with Azure Functions to force connections to be over HTTPS?

I'm not seeing it in the App Settings, and I don't see any reference to web.config for Azure Functions.


回答1:


Update November 2017

In the Azure portal, go to your function app.

Platform features > Custom Domains > toggle HTTPS Only to 'On'.

Anyone using HTTP will receive a 301 Moved Permanently and be redirected to the HTTPS endpoint. You do not need to actually add a new hostname/domain to toggle this feature. This appears to work with both consumption and app service plans.




回答2:


I don't think there is a way today, but I could see making a case for enforcing this globally (or at least as an option).

Please open an issue https://github.com/Azure/azure-webjobs-sdk-script/ so it can get properly tracked.



来源:https://stackoverflow.com/questions/42403492/azure-functions-force-https

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!