0
votes

I have tried configuring Spring Cloud Data Flow (2.0.0.m2) with a prefix, such as:

server.servlet.context-path=/scdf

This does not work because, when you go to http://localhost:9393/scdf/dashboard, the javascript loaded up tries to go to /security/info (not /scdf/security/info).

I am pretty confident this is a bug; I've been reading through the UI code here: https://github.com/spring-cloud/spring-cloud-dataflow-ui, but don't think there is anyway around this beyond a code fix.

But let me ask here first!

3

3 Answers

1
votes

Yes the server.servlet.context-path only configures the backend Spring App. I couldn't find anyway to do this nicely on both the front-end and backend. If you run it using docker compose, etc you could proxy all requests. Otherwise I looked at the codebase and I think the easiest way to configure the front-end as well is to edit the proxy.conf.json file, and append /scdf/ to everything. Not ideal though.

1
votes

This is a current limitation indeed. Both the RESTful endpoints and Dashboard are served from the same root. We redirect to /dashboard by default, so that collides and takes precedence even when a different context-path is set.

We wanted to eventually move all the RESTful endpoints to /api and the Dashboard at /dashboard, to be able to cleanly separate them both.

We are tracking this effort through spring-cloud/spring-cloud-dataflow-ui#747 and spring-cloud/spring-cloud-dataflow#1581.

0
votes

After some research, to work around this issue and run the dataflow server behind Proxy, a DNS entry (for example: scdf.example.com) was created and proxy rules are configured based on the DNS instead of contextpath. Hope this helps!