Commit 8d69cc6b by Johannes Edmeier

Add admin.context-path to turbine proxy url

fixes #341
parent 60c027e2
......@@ -29,6 +29,7 @@ import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import de.codecentric.boot.admin.config.AdminServerProperties;
import de.codecentric.boot.admin.config.AdminServerWebConfiguration;
import de.codecentric.boot.admin.config.RevereseZuulProxyConfiguration;
import spring.boot.admin.turbine.web.TurbineController;
......@@ -61,9 +62,10 @@ public class TurbineAutoConfiguration {
@Bean
@Order(100)
public StaticRouteLocator staticRouteLocator() {
public StaticRouteLocator staticRouteLocator(AdminServerProperties admin) {
Collection<ZuulRoute> routes = Collections
.singleton(new ZuulRoute("/api/turbine/stream/**", properties.getUrl().toString()));
.singleton(new ZuulRoute(admin.getContextPath() + "/api/turbine/stream/**",
properties.getUrl().toString()));
return new StaticRouteLocator(routes, server.getServletPrefix(), zuulProperties);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment