Skip to content

Commit

Permalink
Add shared to list of available substitution sources in _templates.…
Browse files Browse the repository at this point in the history
…md (#7777)

* Update _templates.md

- Added "shared" substitution variable to documentation
- Fixed formatting issue

* Adjust for consistency with request transformer advanced

---------

Co-authored-by: lena-larionova <[email protected]>
  • Loading branch information
lakario and lena-larionova committed Sep 23, 2024
1 parent a68152d commit dfc3a87
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/_hub/kong-inc/request-transformer/how-to/_templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ You can use any of the current request headers, query parameters, and captured U
groups as templates to populate supported configuration fields.

| Request Parameter | Template
| ------------- | -----------
| header | `$(headers.<header_name>)`, `$(headers["<Header-Name>"])` or `$(headers["<header-name>"])`)
| querystring | `$(query_params.<query-param-name>)` or `$(query_params["<query-param-name>"])`)
| captured URIs | `$(uri_captures.<group-name>)` or `$(uri_captures["<group-name>"])`)
| -------------- | -----------
| header | `$(headers.<header_name>)`, `$(headers["<Header-Name>"])` or `$(headers["<header-name>"])`
| querystring | `$(query_params.<query-param-name>)` or `$(query_params["<query-param-name>"])`
| captured URIs | `$(uri_captures.<group-name>)` or `$(uri_captures["<group-name>"])`
| shared variables | `$(shared.<variable-name>)` or `$(shared["<variable-name>"])`)

To escape a template, wrap it inside quotes and pass inside another template.
For example:
Expand Down

0 comments on commit dfc3a87

Please sign in to comment.