I'm actually working on elsasticsearch technologies and I want to use kibana behind a proxy. My choice went to zuul as it's easy to use and allow me to do dynamic routing. But I'm facing an issue. All the page seemed load correctly, but I can't create a default index pattern through the proxy. My guess is that spring-cloud-netfix with zuul does not support redirects (like with ProxyPassReverse in Apache2) so redirects go to the physical URL of the proxied application what typically means that the end-user ends up in nirvana. So Kibana sends some redirect with Location header.
I implemented a filter which simply redirect to kibana routes. Here is the content of my filter:
if (ctx.getRequest().getRequestURL().toString().contains("/kibana"))
ctx.setRouteHost(new URL(url));
if (ctx.getRequest().getRequestURL().toString().contains("/app/kibana"))
ctx.setRouteHost(new URL(url + "/app/kibana"));
if (ctx.getRequest().getRequestURL().toString().contains("/status"))
ctx.setRouteHost(new URL(url + "/status"));
if (ctx.getRequest().getRequestURL().toString().contains("/api/status"))
ctx.setRouteHost(new URL(url + "/api/status"));
if (ctx.getRequest().getRequestURL().toString().contains("/bundles"))
ctx.setRouteHost(new URL(url + "/bundles"));
if (ctx.getRequest().getRequestURL().toString().contains("/elasticsearch"))
ctx.setRouteHost(new URL(url + "/elasticsearch"));
The routes are also map in the yml file. Also when trying to delete an index pattern, I have this issue:
Kibana issue when deleting index pattern
What am I missing to get zuul as a fully reverse proxy?
Issue solved. As the error said "invalid content-type header", I inspected the requests and saw that the content type was missing. I added a request header with the correct content type and it works.