Kong: Routing based on ACCEPT header

Created on 2 Feb 2018  路  6Comments  路  Source: Kong/kong

Is there a plugin or simple feature which lets me route to different upstreams based on the ACCEPT header in the request?

"if XML go to this URL, else if JSON go to this URL"

Most helpful comment

Yeah, recently we also have this requirement, route by the specific header inside request.

All 6 comments

Yeah, recently we also have this requirement, route by the specific header inside request.

We appreciate you took the time to open an issue for this. However, kong github issues are for bug reports only. I'd like to ask you to post this on the Kong Nation forum

No header based routing is currently available, other than writing a custom plugin.

I'll close this issue now. If you think this was closed in error, then please reopen.

I would also need this, what did you end up doing @FBryant87 @devenfan?

Any update on this? How to make custom plugin with routing based on the headers?

Routing by header has been supported since Kong 1.3 - please check out https://docs.konghq.com/1.4.x/proxy/#routes-and-matching-capabilities.

@gszr Thank you so much. It is really helpful.

Was this page helpful?
0 / 5 - 0 ratings