Skip to content

Commit d54e119

Browse files
committed
CORS fix for ssoreset path
1 parent f6a832e commit d54e119

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/edu/harvard/iq/dataverse/authorization/AuthFilter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ public void doFilter(ServletRequest servletRequest, ServletResponse response, Fi
9292
//After resetting, just return with no content
9393
HttpServletResponse httpServletResponse = (HttpServletResponse) response;
9494
httpServletResponse.setStatus(200);
95+
// We must call doFilter to allow other filters (e.g. CORS) to run.
96+
// However, we return immediately after to stop further processing for this path.
97+
filterChain.doFilter(servletRequest, response);
9598
return;
9699
}
97100
if ((httpServletRequest.getMethod() == HttpMethod.GET) && !isCheck && (path.equals("/") || path.endsWith(".xhtml") && !(path.endsWith("logout.xhtml")|| path.endsWith("privateurl.xhtml") || path.contains("jakarta.faces.resource") || path.contains("/oauth2/callback")))) {

0 commit comments

Comments
 (0)