Skip to content

Commit 9912d01

Browse files
authored
Making redirects aware of context path
1 parent 0a680a6 commit 9912d01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/eu/openanalytics/shinyproxy/controllers/IndexController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private Object index(ModelMap map, HttpServletRequest request) {
7777
if (!landingPage.equals(PROXY_LANDING_PAGE_INDEX_OPTION)
7878
&& !landingPage.equals(PROXY_LANDING_PAGE_SINGLE_APP_OPTION)
7979
&& !landingPage.equals(PROXY_LANDING_PAGE_FIRST_APP_OPTION)) {
80-
return new RedirectView(landingPage);
80+
return new RedirectView(landingPage, true);
8181
}
8282

8383
prepareMap(map, request);
@@ -87,11 +87,11 @@ private Object index(ModelMap map, HttpServletRequest request) {
8787

8888
// If set to `FirstApp`, redirect to the first app available to the logged-in user
8989
if (apps.length > 0 && landingPage.equals(PROXY_LANDING_PAGE_FIRST_APP_OPTION)) {
90-
return new RedirectView("/app/" + apps[0].getId());
90+
return new RedirectView("/app/" + apps[0].getId(), true);
9191
}
9292
// If set to `SingleApp` and only one app is available to the logged-in user, redirect to it
9393
if (apps.length == 1 && landingPage.equals(PROXY_LANDING_PAGE_SINGLE_APP_OPTION)) {
94-
return new RedirectView("/app/" + apps[0].getId());
94+
return new RedirectView("/app/" + apps[0].getId(), true);
9595
}
9696

9797
Map<ProxySpec, String> appLogos = new HashMap<>();

0 commit comments

Comments
 (0)