Hi All,
I am calling an API via Tyk Gateway. This API has non canonical headers. What is happening is that Tyk Gateway is converting the headers into canonical headers which causes my API to call to fail as the headers are case sensitive. The API team has refused to change their policy regarding case sensitive headers, so we haveto ensure that the headers are unchanged by Tyk.
I have enable the “ignore_canonical_mime_header_key” but still I am facing the same problem.
the ignore_canonical_mime_header_key variable is limited to JavaScript plugins, global header injection, virtual endpoint and JQ transform header rewrites.
This functionality doesn’t affect headers that are sent by the HTTP client and the default formatting will apply in this case.
You would need to leverage one of the options to achieve non-canonicality.
I think Global Header Injection would work just right. Used together with context variable to retrieve the value of the header.
Enable ignore_canonical_mime_header_key in the gateway config
Enable context variable in the API
Use Global Injection to (re)add the header in a case-sensitive manner
(Optional) Use Global Remove to remove the (original) canonicalized header