【问题标题】:How to restrict access to some URL-path of Azure Web service from Internet?如何限制从 Internet 访问 Azure Web 服务的某些 URL 路径?
【发布时间】:2020-03-03 17:57:13
【问题描述】:

我有一个带有 Web API 的经典 ASP.NET 4.7 Azure Web 服务。 如何限制从 Internet 访问 Azure Web 服务的某些 URL 路径,同时允许访问整个网站,并允许从 VNet 访问受限路径?

我尝试使用 Azure 应用程序网关解决问题,但无法正常工作。这是问题How to route to another path with Azure Application Gateway?

【问题讨论】:

  • 你有机会检查我的答案吗?

标签: azure-web-app-service


【解决方案1】:

从编码的角度来看,您可以使用类似的方式指示here 根据IP 地址对特定URL 进行授权。

从 Azure 应用程序网关的角度来看,您可以尝试使用 custom rules

Allowing and blocking traffic is simple with custom rules. 
For example, you can block all traffic coming from a range of IP addresses. 
You can make another rule to allow traffic if the request comes from a specific browser.

您可以在匹配变量部分利用“RequestUri”变量。 (对WAF不专业,所以没有这样测试)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-09-06
    • 2021-10-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-15
    相关资源
    最近更新 更多