Skip to content

Commit

Permalink
优化url跳转逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
smthing committed Nov 14, 2024
1 parent ec13eb6 commit af2f0cc
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ private boolean matchForwardWelcome(HttpServletRequest request, HttpServletRespo
if (deploymentInfo.getWelcomeFiles().stream().anyMatch(requestUri::endsWith) || requestUri.indexOf(".") > 0) {
return false;
}

response.sendRedirect(requestUri + "/");
request.getRequestDispatcher(requestUri.substring(request.getContextPath().length()) + "/").forward(request, response);
return true;
}

Expand Down

0 comments on commit af2f0cc

Please sign in to comment.