Skip to content

Commit

Permalink
Merge pull request #22 from qzhello/main
Browse files Browse the repository at this point in the history
fix: remove uri logs
  • Loading branch information
qzhello authored Feb 5, 2024
2 parents 89e9a89 + 291354d commit f756eae
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ public boolean supports(Object handler) {
@Override
public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
try {
String ipAddress = request.getHeader("X-Forwarded-For");
if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("Proxy-Client-IP");
}
if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getHeader("WL-Proxy-Client-IP");
}
if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
ipAddress = request.getRemoteAddr();
}
log.warn("[{}] uri: {}", request.getMethod(), request.getRequestURI());
((BaseHandler) handler).handle(request, response);
} catch (Exception e) {
log.error(e.getMessage(), e);
Expand Down

0 comments on commit f756eae

Please sign in to comment.