Skip to content

Commit

Permalink
Policy: routing add liquid use case
Browse files Browse the repository at this point in the history
Signed-off-by: Eloy Coto <[email protected]>
  • Loading branch information
eloycoto committed Aug 1, 2019
1 parent b8eb635 commit 9bcfe76
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions gateway/src/apicast/policy/routing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,35 @@ the path is not `/accounts`:
}
}
```
## Liquid templating on match

It is possible to use liquid templating in the match section. This allows to
define rules with dynamic information and provide a way to match with any
request info.

```json
{
"name": "routing",
"version": "builtin",
"configuration": {
"rules": [
{
"url": "http://example.com",
"condition": {
"operations": [
{
"match": "liquid",
"liquid_value": "{{original_request.path}}",
"op": "matches",
"value": "/bridge-1"
}
]
}
}
]
}
}
```

## Liquid templating

Expand Down

0 comments on commit 9bcfe76

Please sign in to comment.