Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,19 @@ public HasFeatures zuulFeature() {
@Bean
@ConditionalOnMissingBean(DiscoveryClientRouteLocator.class)
public DiscoveryClientRouteLocator discoveryRouteLocator() {
return new DiscoveryClientRouteLocator(this.server.getServlet().getContextPath(), this.discovery, this.zuulProperties,
String contextPath = this.server.getServlet().getContextPath();
if(contextPath == null) contextPath = "";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed and out of scope for this PR.

return new DiscoveryClientRouteLocator(contextPath, this.discovery, this.zuulProperties,
this.serviceRouteMapper, this.registration);
}

// pre filters
@Bean
@ConditionalOnMissingBean(PreDecorationFilter.class)
public PreDecorationFilter preDecorationFilter(RouteLocator routeLocator, ProxyRequestHelper proxyRequestHelper) {
return new PreDecorationFilter(routeLocator, this.server.getServlet().getContextPath(), this.zuulProperties,
String contextPath = this.server.getServlet().getContextPath();
if(contextPath == null) contextPath = "";
return new PreDecorationFilter(routeLocator, contextPath, this.zuulProperties,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proxyRequestHelper);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ public CompositeRouteLocator primaryRouteLocator(
@Bean
@ConditionalOnMissingBean(SimpleRouteLocator.class)
public SimpleRouteLocator simpleRouteLocator() {
return new SimpleRouteLocator(this.server.getServlet().getContextPath(),
String contextPath = this.server.getServlet().getContextPath();
if(contextPath == null) contextPath = "";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed and out of scope for this PR.

return new SimpleRouteLocator(contextPath,
this.zuulProperties);
}

Expand Down