Soru

Zorluk: KolayDefine API Management Policies

A developer is configuring an Azure API Management (APIM) instance to expose a backend API. The backend API includes a custom response header named `X-Backend-Version` that contains sensitive version information. The developer needs to remove this header from all responses before they are returned to the client. In which policy section must the policy to remove this header be placed?

  1. A
    inbound
  2. outboundCevap
  3. C
    backend
  4. D
    on-error

Cevap

outbound
The outbound section in Azure API Management policies is specifically designed to intercept and modify the response returned by the backend service before it is delivered to the client. Therefore, policies like set-header (with an action to delete) must be placed in the outbound section to remove the X-Backend-Version header from the response.

Adım Adım Çözüm

1
Identify the stage of the API Management request-response pipeline where the backend response is processed.
The response has been received from the backend but has not yet been sent to the client.
We need to remove a header from the backend's response before the client receives it.
2
Map the identified stage to the corresponding APIM policy section.
The stage maps to the outbound policy section.
The outbound section handles outgoing response modification.

Anahtar Kavram

Azure API Management policy sections control the timing and context of policy execution. The inbound section modifies incoming requests, backend controls forwarding, outbound modifies responses, and on-error handles exceptions.
Bu soruyu puanla