As of version 2.2 Tyk also allows context variables to be injected into the body using the
._tyk_context. namespace, unlike the context exposed to the URL rewriter and header injector, the body transform can fully iterate through list indices so, for example, calling
_tyk_context.path_parts in a template will expose the first entry in the
The context variables that are available are:
request_data: If the inbound request contained any query data or form data, it will be available in this object as a
path_parts: The components of the path, split on
/, it will be available in this object as a
token: The inbound raw token (if bearer tokens are being used) of this user.
path: The path that is being requested.
remote_addr: The IP address of the connecting client.