Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- session
- 자바
- login
- swagger
- springboot
- SAMBA
- ip체크
- Iterator
- lombok
- Spring
- 접속권한
- Interceptor
- Timeout
- Linux
- indexof
- CentOS
- vi
- new
- 최대최소
- 배열
- String
- Log4j
- 새글
- 톰캣
- java
- 권한부여
- 정해진기간동안
- tomcat
- new아이콘
Archives
- Today
- Total
목록ip체크 (1)
Cheat Sheet
#IP체크 #접속권한 #IP대역
HttpServletRequest req = ((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).getRequest(); String ip = req.getHeader("X-FORWARDED-FOR"); if (ip == null || ip.length() == 0) { ip = req.getHeader("Proxy-Client-IP"); } if (ip == null || ip.length() == 0) { ip = req.getHeader("WL-Proxy-Client-IP"); } if (ip == null || ip.length() == 0) { ip = req.getRemoteAddr() ; } 변수 ip에는 현..
Back End/Java
2019. 4. 4. 13:45