How to configure base on "header" or "cookie" value routing?

How to configure base on “header” or “cookie” value routing?

e.g.

if (request_headers.ANDROID_VERSION is 4.1.1) {
redirect to /mockInternal.com
}

The current version of Kong (0.12) is only capable of redirecting via methods (GET, POST), hosts (example.com) or paths (/foo/bar). In order to do such redirect you would need to write a custom plugin.