You are setting up an API gateway in Azure API Management. You need to restrict client access to a specific range of IP addresses and enable response caching for incoming requests. Which two of the following policy elements must be placed inside the <inbound> section of the policy XML to achieve this?
- ip-filterAnswer
- cache-lookupAnswer
- Ccache-store
- Dforward-request
Answer
To restrict client IP addresses and enable response caching, the ip-filter and cache-lookup policies must be placed in the inbound section of the policy XML.
The policies ip-filter and cache-lookup are used to inspect and filter incoming requests before sending them to the backend service. Therefore, they must be placed in the inbound section of the Azure API Management policy document. Specifically, ip-filter restricts access based on client IP ranges, and cache-lookup checks for cached responses.
Step-by-Step Solution
Key Concept
Azure API Management policy sections control when policies are executed relative to the backend request. Inbound processing policies like ip-filter and cache-lookup must reside in the inbound section.