Skip to content

Commit

Permalink
Merge pull request #3738 from OpenLiberty/404-error-fix
Browse files Browse the repository at this point in the history
404 error fix
  • Loading branch information
natalie-bernhard authored May 15, 2024
2 parents 6a2b29b + 9ad1c0f commit b090135
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Security Policy

## Reporting a Vulnerability

Please report security vulnerabilities by going to our Security tab and selecting `Report a vulnerability` to submit a description of the issue. Our maintainers will triage the submission as soon as possible.
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 b090135

Please sign in to comment.