Skip to content

Commit

Permalink
send 404 error when getting 404 page
Browse files Browse the repository at this point in the history
  • Loading branch information
natalie-bernhard committed May 15, 2024
1 parent b2b9a4d commit 6fd61fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/io/openliberty/website/SecurityFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain
req.getRequestDispatcher(uri.concat(".gz")).include(req, response);
}
catch(FileNotFoundException e) {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
response.sendRedirect("/404.html");
response.reset();
response.setHeader("Content-Type", "text/html");
response.sendError(404);
return;
}
}
} else if (uri.startsWith("/api/builds/") || uri.startsWith("/api/github/")) {
Expand Down

0 comments on commit 6fd61fe

Please sign in to comment.