Azure功能:是否可以使用web.config限制(例如IP限制或基本Auth) [英] Azure-Functions: Can you use web.config restrictions (e.g. IP restriction or basic Auth)

查看:95
本文介绍了Azure功能:是否可以使用web.config限制(例如IP限制或基本Auth)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Azure网站,IP限制可能为使用基本身份验证"保护网站..

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

Azure Functions上是否存在这些或其他任何web.config技术,还是需要对其进行编码?

Are these, or any other web.config techniques possible on Azure Functions or do they need to be coded?

我在Azure函数的wwwroot的基础上创建了一个web.config,但是如果我做对了,就可以了.它似乎被忽略了.

I created a web.config in the base of my wwwroot of an Azure Function, but if I did it right; it appears to be ignored.

为了进一步阐明为什么",我们有一个质量检查站点,内部和外部测试人员都可以访问该站点.我们希望使该站点通常不可用,但确实希望能够为少数位置的人提供进行测试的访问权限.

To further clarify "Why", we have a QA site that needs to be accessible by internal and external testers. We'd like to make the site generally not available, but really want to be able to give people at a few locations access for testing.

但是,我们不知道将要进行测试的每个人都是最后一个人,所以我们不能仅启用Azure AD Auth.我们也不想仅维护单独的代码以使其可用.

We don't know every last person that will be doing the testing, however, so we can't just enable the Azure AD Auth. We'd also rather not maintain separate code just to make this available.

推荐答案

已经有一段时间了,对此的答案也有所改变.虽然仍然无法直接使用web.config文件执行此操作,但这些平台功能现在可以在Azure门户中使用.

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.

如果您导航至: https://portal.azure.com

然后转到:

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

您可以在此处配置IP限制,它将应用于您的功能应用程序.

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.

这篇关于Azure功能:是否可以使用web.config限制(例如IP限制或基本Auth)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆