Reputation: 2897
I want to put SCDF's dashboard behind zuul (or just assume any proxy, really), but when I do that, Spring Cloud Data Flow will redirect to what it thinks it's actual host is.
Example: Zuul is http://zuul/. It's configured to route any /dashboard requests to http://scdf/host
In a browser, I go to http://zuul/dashboard.
As soon as the request routes through zuul, and then hits SCDF, SCDF will redirect to http://scdfhost/dashboard, which won't work in a locked down environment. (scdfhost will not be visible through the outside)
I've looked for any properties that would work here, but I can't figure it out.
Anyone tried this? Or tips?
Upvotes: 0
Views: 839
Reputation: 588
Thanks for your question! The issue is the redirect 302
from http://localhost:9393/dashboard
to the absolute URI of the dashboard (http://localhost:9393/dashboard/index.html). If you are running Spring Cloud Data Flow Server behind a proxy server, such as Zuul, you will have to specify the property
server.use-forward-headers
and set it to true
. That way Spring Boot is aware of the HTTP forward headers from the proxy. See also the Spring Boot reference guide ("Running Behind a Front-end Proxy Server").
You can find a basic example at:
https://github.com/spring-cloud/spring-cloud-dataflow-samples/tree/master/dataflow-zuul
In order to clarify the reference documentation, I have created a follow-up issue:
https://github.com/spring-cloud/spring-cloud-dataflow/issues/2929
Upvotes: 1