Tyk v2.2 Documentation Components

HomeTyk v2.2 Documentation ComponentsRequest Headers: Context Variables

Request Headers: Context Variables

As of version 2.2 Tyk also allows context variables to be injected into headers using the $tyk_context. namespace.

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, for the header injector, Tyk will format this data as key:value1,value2,valueN;key:value1,value2 etc.
  • path_parts: The components of the path, split on /, again these values are made available in the format of a comma delimited list
  • 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
Was this article helpful to you? Yes No