web.config中的ipSecurity部分是否可以与Azure App Services一起使用?
Does the ipSecurity section in web.config works with Azure App Services?
如何使用Azure上托管的Web应用程序设置简单的IP地址阻止(黑名单)?
What are the steps to get a simple IP address blocking (black list) set up with a web app hosted on Azure?
推荐答案App Service在网络连接> IP限制
App Service provides UX for this under Networking > Ip Restrictions
您可以在此处阻止特定的IP地址或地址范围:
From here you can block a specic ip address or a range of address:
如果要通过web.config进行操作,则需要使用XDT转换
If you want to do it through web.config you will need to use XDT Transforms
<?xml version="1.0"?> <configuration xmlns:xdt="schemas.microsoft/XML-Document-Transform"> <system.webServer> <security> <ipSecurity xdt:Transform="RemoveAttributes(allowUnlisted)"> <add ipAddress="204.79.197.200" allowed="true" xdt:Transform="Insert"/> </ipSecurity> </security> </system.webServer> </configuration>您可以在此处了解有关XDT转换和应用程序服务的更多信息: github/projectkudu/kudu/wiki/Xdt-transform-samples
You can read more about XDT transforms and app service here: github/projectkudu/kudu/wiki/Xdt-transform-samples
更多推荐
如何使用Azure App Service/Web App限制IP地址
发布评论