From dbdc19bb95eed28d9f29ca32d7e05bd52474e148 Mon Sep 17 00:00:00 2001 From: seongha <11pi885@gmail.com> Date: Tue, 12 Mar 2024 14:33:36 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20cors=20=ED=97=88=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../crosspuzzleserver/controller/puzzle/PuzzleController.java | 2 ++ .../controller/puzzle/PuzzleQueryController.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleController.java b/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleController.java index 519ffcd..b6f8032 100644 --- a/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleController.java +++ b/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleController.java @@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -16,6 +17,7 @@ @Slf4j @RestController @RequiredArgsConstructor +@CrossOrigin(origins = "*") @RequestMapping("") public class PuzzleController { diff --git a/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleQueryController.java b/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleQueryController.java index e7743e9..a8b493c 100644 --- a/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleQueryController.java +++ b/src/main/java/com/example/crosspuzzleserver/controller/puzzle/PuzzleQueryController.java @@ -14,6 +14,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -24,6 +25,7 @@ @Slf4j @RestController @RequiredArgsConstructor +@CrossOrigin(origins = "*") @RequestMapping("") public class PuzzleQueryController {