[
https://issues.apache.org/jira/browse/KNOX-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Minder updated KNOX-618:
------------------------------
Description:
I recently ran into a situation where it would be useful to have access to
header values in the rewrite rules. In particular it would be useful sometimes
to API version with a header like this.
{code}
<match pattern="{*}://{host}:{port}/api/{path=**}?{**}">
<rewrite
template=""{*}://{host}:{port}/api/{$header[version]}/{path}?{**}""/>
</match>
{code}
was:
I recently ran into a situation where it would be useful to have access to
header values in the rewrite rules. In particular it would be useful sometimes
to API version with a header like this.
{code}
<match pattern="{*}://{host}:{port}/{path=**}?{**}">
<rewrite template="{*}://{host}:{port}/{path}?{$header[version]}&{**}"/>
</match>
{code}
> Rewrite function for accessing header values
> --------------------------------------------
>
> Key: KNOX-618
> URL: https://issues.apache.org/jira/browse/KNOX-618
> Project: Apache Knox
> Issue Type: New Feature
> Components: Server
> Affects Versions: 0.6.0
> Reporter: Kevin Minder
> Priority: Minor
> Fix For: 0.7.0
>
>
> I recently ran into a situation where it would be useful to have access to
> header values in the rewrite rules. In particular it would be useful
> sometimes to API version with a header like this.
> {code}
> <match pattern="{*}://{host}:{port}/api/{path=**}?{**}">
> <rewrite
> template=""{*}://{host}:{port}/api/{$header[version]}/{path}?{**}""/>
> </match>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)