Browse Source

접근방지 테스트

SBK 2 years ago
parent
commit
6bd1847fe6
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/main/java/sgc/portal/websquare/web/WebsquareController.java

+ 6 - 3
src/main/java/sgc/portal/websquare/web/WebsquareController.java

@@ -2,6 +2,8 @@ package sgc.portal.websquare.web;
 
 
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.ObjectMapper;
+
+import scala.Console;
 import sgc.portal.SgcPortalAttributes;
 import sgc.portal.SgcPortalAttributes;
 import sgc.portal.SgcPortalProperties;
 import sgc.portal.SgcPortalProperties;
 import sgc.portal.base.util.SessionUtil;
 import sgc.portal.base.util.SessionUtil;
@@ -129,7 +131,7 @@ public class WebsquareController {
 		// 지정된 url에서 접근 가능하도록 추가
 		// 지정된 url에서 접근 가능하도록 추가
 		// ---------------------------------------------------------------------------------------------------------------
 		// ---------------------------------------------------------------------------------------------------------------
 		String referer = StringUtils.trimToNull(request.getHeader("Referer"));
 		String referer = StringUtils.trimToNull(request.getHeader("Referer"));
-		
+		System.out.print("111111111111111111111111111111111111111111111111111111111111111111" + referer);
 		if (StringUtils.isEmpty(referer)) {
 		if (StringUtils.isEmpty(referer)) {
 			response.setContentType("text/html; charset=UTF-8");
 			response.setContentType("text/html; charset=UTF-8");
 			PrintWriter out;
 			PrintWriter out;
@@ -141,6 +143,7 @@ public class WebsquareController {
 				// TODO Auto-generated catch block
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 				e.printStackTrace();
 			}
 			}
+			return mv;
 		}
 		}
 		
 		
 		if( referer.substring(0,24).equals("https://gw.sgcetec.co.kr") || 
 		if( referer.substring(0,24).equals("https://gw.sgcetec.co.kr") || 
@@ -188,6 +191,7 @@ public class WebsquareController {
 			mv.setViewName(jspUrl);
 			mv.setViewName(jspUrl);
 			mv.addObject("w2xPath", movePage);
 			mv.addObject("w2xPath", movePage);
 			mv.addObject("userDetails", jsonInString);
 			mv.addObject("userDetails", jsonInString);
+			return mv;
 			
 			
 		} else {
 		} else {
 			response.setContentType("text/html; charset=UTF-8");
 			response.setContentType("text/html; charset=UTF-8");
@@ -200,10 +204,9 @@ public class WebsquareController {
 				// TODO Auto-generated catch block
 				// TODO Auto-generated catch block
 				e.printStackTrace();
 				e.printStackTrace();
 			}
 			}
+			return mv;
 			
 			
 		}
 		}
-		
-		return mv;
 		// ---------------------------------------------------------------------------------------------------------------
 		// ---------------------------------------------------------------------------------------------------------------
 
 
 	}
 	}