Azure / api-management-policy-snippets

Re-usable examples of Azure API Management policies
MIT License
326 stars 147 forks source link

Possibility to amend multi value header e.g. Set-Cookie? #87

Open CezaryKlus opened 2 years ago

CezaryKlus commented 2 years ago

Hi,

Is there any possibility to loop through multi-value request header and change it?

<when condition="@(context.Response.Headers.ContainsKey("Set-Cookie"))">
  <set-header name="Set-Cookie" exists-action="override">
      ... How can I loop through multi value header and update each value of context.Request.Headers["Set-Cookie"]
  </set-header>
</when>
nathankitchen commented 8 months ago

I’m having this exact issue. Did you find a solution?

Edit: I've submitted a question on Microsoft Q&A, and also opened an issue on the <set-header /> documentation.