File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
gateway-ha/src/main/java/io/trino/gateway/ha/handler Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,14 @@ private RoutingTargetResponse getRoutingTargetResponse(HttpServletRequest reques
9191 RoutingSelectorResponse routingDestination = routingGroupSelector .findRoutingDestination (request );
9292 String user = request .getHeader (USER_HEADER );
9393
94- // This falls back on default routing group backend if there is no cluster found for the routing group.
94+ // When no cluster is found:
95+ // - If strictRouting is false, fall back to the default routing group backend.
96+ // - If strictRouting is true, return a 404 response.
9597 String routingGroup = !isNullOrEmpty (routingDestination .routingGroup ())
9698 ? routingDestination .routingGroup ()
9799 : defaultRoutingGroup ;
98- ProxyBackendConfiguration backendConfiguration = routingManager .provideBackendConfiguration (routingGroup , user , routingDestination .strictRouting ());
100+ boolean strictRouting = Optional .ofNullable (routingDestination .strictRouting ()).orElse (false );
101+ ProxyBackendConfiguration backendConfiguration = routingManager .provideBackendConfiguration (routingGroup , user , strictRouting );
99102 String clusterHost = backendConfiguration .getProxyTo ();
100103 String externalUrl = backendConfiguration .getExternalUrl ();
101104 // Apply headers from RoutingDestination if there are any
You can’t perform that action at this time.
0 commit comments