|
|
@@ -1,8 +1,5 @@
|
|
|
package com.style24.front.support.interceptor;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
@@ -65,25 +62,25 @@ public class TsfDefaultInterceptor extends HandlerInterceptorAdapter {
|
|
|
// 앱 검사를 위해
|
|
|
// 1.웹으로 접근하고
|
|
|
// 2.특정IP(아이스타일본사: 180.71.39.150, 한세엠케이: 106.251.248.202, 한세드림: 218.144.146.18)가 아니면
|
|
|
- String ipAddr = TsfSession.getIpAddress();
|
|
|
- String active = env.getProperty("spring.profiles.active");
|
|
|
- List<String> ipWhiteList = new ArrayList<>();
|
|
|
- ipWhiteList.add("180.71.39.150"); // 아이스타일 본사
|
|
|
- ipWhiteList.add("106.251.248.202"); // 한세엠케이
|
|
|
- ipWhiteList.add("218.144.146.18"); // 한세드림
|
|
|
- ipWhiteList.add("14.129.18.111"); // 스윗트래커
|
|
|
- ipWhiteList.add("58.180.40.40"); // 코마스
|
|
|
- ipWhiteList.add("221.150.126.74"); // 모비온
|
|
|
- ipWhiteList.add("221.150.126.75"); // 모비온
|
|
|
-
|
|
|
- log.info("IP Address: [{}]", ipAddr);
|
|
|
- if (TsfSession.getAttribute("isApp").equals("false") &&
|
|
|
- !ipWhiteList.contains(ipAddr) &&
|
|
|
- !"locd".equals(active) &&
|
|
|
- !"tsit".equals(active)) {
|
|
|
- response.sendRedirect("https://m.istyle24.com");
|
|
|
- return false;
|
|
|
- }
|
|
|
+ // String ipAddr = TsfSession.getIpAddress();
|
|
|
+ // String active = env.getProperty("spring.profiles.active");
|
|
|
+ // List<String> ipWhiteList = new ArrayList<>();
|
|
|
+ // ipWhiteList.add("180.71.39.150"); // 아이스타일 본사
|
|
|
+ // ipWhiteList.add("106.251.248.202"); // 한세엠케이
|
|
|
+ // ipWhiteList.add("218.144.146.18"); // 한세드림
|
|
|
+ // ipWhiteList.add("14.129.18.111"); // 스윗트래커
|
|
|
+ // ipWhiteList.add("58.180.40.40"); // 코마스
|
|
|
+ // ipWhiteList.add("221.150.126.74"); // 모비온
|
|
|
+ // ipWhiteList.add("221.150.126.75"); // 모비온
|
|
|
+ //
|
|
|
+ // log.info("IP Address: [{}]", ipAddr);
|
|
|
+ // if (TsfSession.getAttribute("isApp").equals("false") &&
|
|
|
+ // !ipWhiteList.contains(ipAddr) &&
|
|
|
+ // !"locd".equals(active) &&
|
|
|
+ // !"tsit".equals(active)) {
|
|
|
+ // response.sendRedirect("https://m.istyle24.com");
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
|
|
|
return super.preHandle(request, response, handler);
|
|
|
}
|