Your content goes here...
<policies> <inbound> <check-header name="MyHeader1" failed-check-httpcode="401" failed-check-error-message="MyHeader1 header missing!" ignore-case="false"> <value>@(context.Request.Headers.GetValueOrDefault("MyHeader1", ""))</value> </check-header> <check-header name="MyHeader2" failed-check-httpcode="401" failed-check-error-message="MyHeader2header missing!" ignore-case="false"> <value>@(context.Request.Headers.GetValueOrDefault("MyHeader2", ""))</value> </check-header> <base /> </inbound> <backend> <base /> </backend> <outbound> <base /> </outbound> <on-error> <base /> </on-error> </policies2 |
By doing this instead of adding the headers in every method we lost in the Logic App was, when adding the API Management method artifact we lost the possibility of choosing the Headers from the drop down and had to go to code view and add the headers manually.
What we gained, deployments/new releases can be automated in a better way.
I was sent an article regarding some importing api restrictions that can be found in the URL below
https://docs.microsoft.com/en-us/azure/api-management/api-management-api-import-restrictions
Currently, I'm happy with this solution, however, still investigating if there is a better way of doing this.
Any questions, don't hesitate in contacting me.
Hope it helps.
*This post is locked for comments