Global plugin to intercept all http request/response

Hi, Is it possible to have a global plugin to intercept all HTTP request/response?
My case is I’d like to add several HTTP response headers to all incoming http requests.
Thank you

Hi @Raka,

Tyk has an inbuilt “global header transform” middleware that you can configure via your API definition. This allows you to add custom headers to all incoming HTTP requests to the API.

There is also a “per-endpoint header transform” middleware if you need more granular control.

We don’t however, have a middleware that does the same thing across APIs - you would have to enable the “global header transform” for all of your APIs.

Take a look at the Tyk Gateway docs here: Request Header Transformation

I hope this helps!

1 Like