public String getRemortIP(HttpServletRequest request) { 
  if (request.getHeader("x-forwarded-for") == null) { 
   return request.getRemoteAddr(); 
  } 
  return request.getHeader("x-forwarded-for"); 
 } 

原文:http://developer.51cto.com/art/201111/305181.htm

相关文章:

猜你喜欢
  • 2021-11-08
  • 2022-02-04
  • 2021-06-19
  • 2021-12-11
  • 2021-09-04
  • 2021-10-02
相关资源
相似解决方案