The issue you're experiencing with the missing custom header "x-api-key" in your Logic App could be related to how Azure Logic Apps handle certain HTTP headers. Azure Logic Apps automatically remove specific headers from incoming requests without warning. According to the documentation, the following headers are omitted:
-
Accept-*headers except forAccept-version -
Allow -
Content-*headers except forContent-Disposition,Content-Encoding, andContent-Type(only honored in POST and PUT operations) -
Cookie -
Expires -
Host -
Last-Modified -
Origin -
Set-Cookie -
Transfer-Encoding
While the x-api-key header is not explicitly listed among the omitted headers, it is important to ensure that it is being sent correctly and that there are no other issues in the API or Logic App configuration that might affect its transmission.
If the issue persists, consider checking for any changes in the API configuration or network settings that could have inadvertently affected the header's delivery. Additionally, you might want to inspect the request using tools like APIM inspector trace to see how the request is processed within the Logic App pipeline.
References: