Skip to content

Commit

Permalink
Use UIErrorPageServlet for handling errors
Browse files Browse the repository at this point in the history
Signed-off-by: Wouter Born <[email protected]>
  • Loading branch information
wborn committed Jan 13, 2023
1 parent f90044a commit ca15044
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,11 @@ public void init() throws UnavailableException {
}
} else {
URL url = defaultHttpContext.getResource(APP_BASE + name);
// if we don't find a resource, and it's not a check for a compressed version, return the app base and let
// if we don't find a resource, and it's not a check for a compressed version,
// let the UIErrorPageServlet return the app base with a proper response code that lets
// the Vue.js main UI handle routing
if (url == null && Arrays.stream(COMPRESS_EXT).noneMatch(name::endsWith)) {
// sending a directory will trigger "getWelcomeFile" to be called which is required to avoid
// Jetty doing a 302 redirect which breaks Vue.js routing when reloading the browser on some pages
url = defaultHttpContext.getResource(APP_BASE);
return null;
}
try {
logger.debug("getResource bundle file returning {}", url);
Expand Down

0 comments on commit ca15044

Please sign in to comment.