Skip to content

Commit

Permalink
fixed issues in pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
holashchand committed Jan 4, 2024
1 parent 3cd1571 commit 8303bac
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
try {
if (request.getRequestURI().matches(INVITE_URL_PATTERN) &&
anonymousInviteSchemas.stream()
.map(d -> String.format("/api/v1/%s/invite(/)?", d))
.map(d -> String.format("/api/v1/%s/invite(/)?(\\?.*)?", d))
.anyMatch(request.getRequestURI()::matches)) {
servletRequest.getRequestDispatcher(((HttpServletRequest) servletRequest).getServletPath()).forward(servletRequest, servletResponse);
return;
} else if (!request.getRequestURI().matches(INVITE_URL_PATTERN) && anonymousSchemas.stream()
.map(d -> String.format("/api/v1/%s(/.*)?", d))
.map(d -> String.format("/api/v1/%s(/.*)?(\\?.*)?", d))
.anyMatch(request.getRequestURI()::matches)) {
servletRequest.getRequestDispatcher(((HttpServletRequest) servletRequest).getServletPath()).forward(servletRequest, servletResponse);
return;
Expand Down

0 comments on commit 8303bac

Please sign in to comment.