|
20 | 20 | import com.google.auto.service.AutoService;
|
21 | 21 | import com.google.common.collect.ImmutableMap;
|
22 | 22 | import com.google.common.collect.ImmutableSet;
|
| 23 | + |
23 | 24 | import org.openqa.selenium.BuildInfo;
|
24 | 25 | import org.openqa.selenium.cli.CliCommand;
|
25 | 26 | import org.openqa.selenium.grid.TemplateGridServerCommand;
|
|
63 | 64 | import static org.openqa.selenium.grid.config.StandardGridRoles.SESSION_MAP_ROLE;
|
64 | 65 | import static org.openqa.selenium.grid.config.StandardGridRoles.SESSION_QUEUER_ROLE;
|
65 | 66 | import static org.openqa.selenium.net.Urls.fromUri;
|
| 67 | +import static org.openqa.selenium.remote.http.Route.combine; |
66 | 68 | import static org.openqa.selenium.remote.http.Route.get;
|
67 | 69 |
|
68 | 70 | @AutoService(CliCommand.class)
|
@@ -143,10 +145,13 @@ protected Handlers createHandlers(Config config) {
|
143 | 145 | getServerVersion());
|
144 | 146 |
|
145 | 147 | Routable ui = new GridUiRoute();
|
| 148 | + Routable routerWithSpecChecks = new Router(tracer, clientFactory, sessions, queuer, distributor) |
| 149 | + .with(networkOptions.getSpecComplianceChecks()); |
146 | 150 |
|
147 | 151 | Route handler = Route.combine(
|
148 | 152 | ui,
|
149 |
| - new Router(tracer, clientFactory, sessions, queuer, distributor).with(networkOptions.getSpecComplianceChecks()), |
| 153 | + routerWithSpecChecks, |
| 154 | + Route.prefix("/wd/hub").to(combine(routerWithSpecChecks)), |
150 | 155 | Route.options("/graphql").to(() -> graphqlHandler),
|
151 | 156 | Route.post("/graphql").to(() -> graphqlHandler),
|
152 | 157 | get("/readyz").to(() -> req -> new HttpResponse().setStatus(HTTP_NO_CONTENT)));
|
|
0 commit comments