Prior to Repose version 9.0, some request and response headers were split at the boundaries of Repose. This recipe shows you how to configure Repose to split those headers, should you need to, in versions after the change.

Change the system-model.cfg.xml

The first thing to do is update your system model to include the split-header filter.

Partial system-model.cfg.xml
        <filters>
            <filter name="split-header"/> (1)
            ....                          (2)
        </filters>
1 The new filter to be added to the filter chain.
2 The rest of the existing filter chain.

Add the Split Header Filter Config

Add the new filter config to your config directory.

split-header.cfg.xml
<?xml version="1.0" encoding="UTF-8"?>

<split-header xmlns='http://docs.openrepose.org/repose/split-header/v1.0'>
    <request>
        <header>accept</header>
        <header>accept-charset</header>
        <header>accept-encoding</header>
        <header>accept-language</header>
        <header>allow</header>
        <header>cache-control</header>
        <header>connection</header>
        <header>content-encoding</header>
        <header>content-language</header>
        <header>expect</header>
        <header>pragma</header>
        <header>proxy-authenticate</header>
        <header>te</header>
        <header>trailer</header>
        <header>transfer-encoding</header>
        <header>upgrade</header>
        <header>warning</header>
        <header>x-authenticated-by</header>
        <header>x-authorization</header>
        <header>x-catalog</header>
        <header>x-contact-id</header>
        <header>x-default-region</header>
        <header>x-domain</header>
        <header>x-domain-id</header>
        <header>x-identity-status</header>
        <header>x-impersonator-id</header>
        <header>x-impersonator-name</header>
        <header>x-impersonator-roles</header>
        <header>x-map-roles</header>
        <header>x-pp-next-route</header>
        <header>x-pp-user</header>
        <header>x-pp-groups</header>
        <header>x-relevant-roles</header>
        <header>x-roles</header>
        <header>x-tenant-id</header>
        <header>x-tenant-name</header>
        <header>x-token-expires</header>
        <header>x-trace-request</header>
        <header>x-ttl</header>
        <header>x-user-name</header>
        <header>x-user-id</header>
    </request>
    <response>
        <header>accept</header>
        <header>accept-charset</header>
        <header>accept-encoding</header>
        <header>accept-language</header>
        <header>allow</header>
        <header>cache-control</header>
        <header>connection</header>
        <header>content-encoding</header>
        <header>content-language</header>
        <header>expect</header>
        <header>pragma</header>
        <header>proxy-authenticate</header>
        <header>te</header>
        <header>trailer</header>
        <header>transfer-encoding</header>
        <header>upgrade</header>
        <header>warning</header>
        <header>x-authenticated-by</header>
        <header>x-authorization</header>
        <header>x-catalog</header>
        <header>x-contact-id</header>
        <header>x-default-region</header>
        <header>x-domain</header>
        <header>x-domain-id</header>
        <header>x-identity-status</header>
        <header>x-impersonator-id</header>
        <header>x-impersonator-name</header>
        <header>x-impersonator-roles</header>
        <header>x-map-roles</header>
        <header>x-pp-next-route</header>
        <header>x-pp-user</header>
        <header>x-pp-groups</header>
        <header>x-relevant-roles</header>
        <header>x-roles</header>
        <header>x-tenant-id</header>
        <header>x-tenant-name</header>
        <header>x-token-expires</header>
        <header>x-trace-request</header>
        <header>x-ttl</header>
        <header>x-user-name</header>
        <header>x-user-id</header>
    </response>
</split-header>

This list is exhaustive, it’s recommended that you cut it down to the headers that you care about being split.

If you have custom filters that need the exact behavior as previously provided, you should use two instances of the split-header filter. One should be the request headers at the beginning of the chain, and one should be response headers at the end of the chain.

Additional Information

You can find more information on the split-header filter here.