diff --git a/src/main/java/shop/hooking/hooking/controller/CopyController.java b/src/main/java/shop/hooking/hooking/controller/CopyController.java index 65d7b77..9b979f1 100644 --- a/src/main/java/shop/hooking/hooking/controller/CopyController.java +++ b/src/main/java/shop/hooking/hooking/controller/CopyController.java @@ -47,7 +47,7 @@ public class CopyController { // 전체 카피라이팅 조회 - @GetMapping("/{index}") + @GetMapping("/{index}") //copy/0=> 0-30 copy/1=>0~30 copy/2=>60~90 copy/9 => 270~300 public HttpRes> copyList(HttpServletRequest httpRequest,@PathVariable int index) { Long[] brandIds = {2L, 3L, 4L, 12L, 15L, 17L, 21L, 24L, 25L, 28L}; diff --git a/src/main/java/shop/hooking/hooking/controller/RefererController.java b/src/main/java/shop/hooking/hooking/controller/RefererController.java new file mode 100644 index 0000000..73574ee --- /dev/null +++ b/src/main/java/shop/hooking/hooking/controller/RefererController.java @@ -0,0 +1,30 @@ +package shop.hooking.hooking.controller; + +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; + +@RestController +@RequiredArgsConstructor +@RequestMapping("/example") +public class RefererController { + + @GetMapping("/login") + public String login(HttpServletRequest request) { + // Referer 헤더 확인 + String referer = request.getHeader("Referer"); + System.out.println("Referer: " + referer); + + // Host 헤더 확인 + String host = request.getHeader("Host"); + System.out.println("Host: " + host); + + // 로그인 성공 후 리다이렉트할 URL 분기처리 등 추가 작업 수행 + + return "Login success"; + } +} +