0

I have a classic ASP.NET 4.7 Azure Web service with an Web API. How to restrict access to some URL-path of Azure Web service from Internet while allow to access the whole web site, and allow access to the restricted path from a VNet? enter image description here

I tried to solve the problem using Azure Application Gateway, but it does not work properly. Here is the question How to route to another path with Azure Application Gateway?

Community
  • 1
  • 1
Michael Chudinov
  • 2,620
  • 28
  • 43

1 Answers1

0

From perspective of coding, you could use this similar way instructed here to authorized on specific URL based on IP address.

From perspective for Azure Application Gateway, you could try using 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.

You can leverage "RequestUri" variable in Match variable section. (Not professional on WAF, so didn't test this way)

Tom Luo
  • 602
  • 3
  • 10