Azure-Functions: Can you use web.config restrictions (e.g. IP restriction or basic Auth)

前端 未结 2 1251
情话喂你
情话喂你 2021-01-23 03:02

IP Restrictions are possible for Azure Websites as is protecting the site with Basic Authentication..

Are these, or any other web.config techniques possible on Azure Fu

2条回答
  •  故里飘歌
    2021-01-23 03:28

    Its been some time and the answer to this has kind of changed. While its still not possible to directly do this with a web.config file, these platform features are now available in the Azure Portal.

    If you navigate to: https://portal.azure.com

    And then go to:

    App Services -> (Your Func App Name) -> Platform Features -> Networking -> Configure IP Restrictions
    

    You can configure IP restrictions here and it will apply to your function app.

    Similarly, there are now several authentication options under:

    App Services -> (Your Func App Name) -> Platform Features -> Authentication / Authorization
    

    This doesn't include basic auth, but it does include a bunch of stuff.

提交回复
热议问题