Browse Source

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.front.git into develop

jmh 4 năm trước cách đây
mục cha
commit
f32efee357

+ 13 - 0
src/main/java/com/style24/front/support/interceptor/TsfDefaultInterceptor.java

@@ -55,6 +55,19 @@ public class TsfDefaultInterceptor extends HandlerInterceptorAdapter {
 		// Set APP Info.
 		this.setAppInfo(request);
 
+		// 앱 검사를 위해
+		// 1.웹으로 접근하고
+		// 2.특정IP(아이스타일본사: 180.71.39.150, 한세엠케이: 106.251.248.202, 한세드림: 218.144.146.18)가 아니면
+		String ipAddr = TsfSession.getIpAddress();
+		log.info("IP Address: [{}]", ipAddr);
+		if (TsfSession.getAttribute("isApp").equals("false") &&
+			!ipAddr.equals("180.71.39.150") &&
+			!ipAddr.equals("106.251.248.202") &&
+			!ipAddr.equals("218.144.146.18")) {
+			response.sendRedirect("https://m.istyle24.com");
+			return false;
+		}
+
 		return super.preHandle(request, response, handler);
 	}