Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 error fix #3738

Merged
merged 2 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading