Azure API Management request url whitelisting instead of IP address

Mouli Kaku 46 Reputation points
2020-12-22T11:08:49.397+00:00

Hello,

In Azure API management we can successfully Restrict caller IPs (https://learn.microsoft.com/en-us/azure/api-management/api-management-access-restriction-policies) using

<ip-filter action="allow | forbid">
<address>address</address>
<address-range from="address" to="address" />
</ip-filter>

Is it possible to restrict caller by URL instead of IP?

TIA,
MK

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,805 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,591 Reputation points Microsoft Employee
    2020-12-23T06:12:03.64+00:00

    If you are looking to prevent CORS, you could directly use the cors policy.

    That being said, you could simply use the check-header policy to look at the Host header for the URL used by your client but note that the value of the header can be spoofed from untrusted clients. While browsers add that header by default (and can't be changed), other clients, like Postman for example, could be used to insert any host header value required.

    0 comments No comments

0 additional answers

Sort by: Most helpful