Skip to content

Commit

Permalink
[Java] Have grid console permanently redirect to the new UI url
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Sep 8, 2020
1 parent 5e90074 commit 106d0a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/server/src/org/openqa/selenium/grid/commands/Hub.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
import java.util.logging.Logger;

import static java.net.HttpURLConnection.HTTP_INTERNAL_ERROR;
import static java.net.HttpURLConnection.HTTP_MOVED_TEMP;
import static java.net.HttpURLConnection.HTTP_MOVED_PERM;
import static java.net.HttpURLConnection.HTTP_OK;
import static org.openqa.selenium.grid.config.StandardGridRoles.EVENT_BUS_ROLE;
import static org.openqa.selenium.grid.config.StandardGridRoles.HTTPD_ROLE;
Expand Down Expand Up @@ -153,7 +153,7 @@ protected void execute(Config config) {
ResourceHandler
uiHandler = new ResourceHandler(new ClassPathResource(uiRoot, "javascript/grid-ui/build"));
ui = Route.combine(
get("/grid/console").to(() -> req -> new HttpResponse().setStatus(HTTP_MOVED_TEMP).addHeader("Location", "/ui/index.html")),
get("/grid/console").to(() -> req -> new HttpResponse().setStatus(HTTP_MOVED_PERM).addHeader("Location", "/ui/index.html")),
Route.prefix("/ui/").to(Route.matching(req -> true).to(() -> uiHandler)));
} else {
Json json = new Json();
Expand Down

0 comments on commit 106d0a8

Please sign in to comment.