From 9da5f1210ea650dcb1d82f333d467a35ef4d1142 Mon Sep 17 00:00:00 2001 From: jimmy0006 Date: Fri, 29 Mar 2024 20:32:24 +0900 Subject: [PATCH] fix:allow poolchub extension from cors error --- .../java/org/poolc/api/auth/controller/AuthController.java | 6 ++---- .../poolc/api/baekjoon/controller/BaekjoonController.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/poolc/api/auth/controller/AuthController.java b/src/main/java/org/poolc/api/auth/controller/AuthController.java index 3b52b70d..4eb4b0ef 100644 --- a/src/main/java/org/poolc/api/auth/controller/AuthController.java +++ b/src/main/java/org/poolc/api/auth/controller/AuthController.java @@ -8,13 +8,11 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.security.core.annotation.AuthenticationPrincipal; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/login") +@CrossOrigin(origins = "chrome-extension://doeamknhlolnflkmhbhkagganhjjbefe") public class AuthController { private final AuthService authService; diff --git a/src/main/java/org/poolc/api/baekjoon/controller/BaekjoonController.java b/src/main/java/org/poolc/api/baekjoon/controller/BaekjoonController.java index dc04809e..1282d21a 100644 --- a/src/main/java/org/poolc/api/baekjoon/controller/BaekjoonController.java +++ b/src/main/java/org/poolc/api/baekjoon/controller/BaekjoonController.java @@ -8,12 +8,12 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.security.core.annotation.AuthenticationPrincipal; -import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping(value="/baekjoon", produces = MediaType.APPLICATION_JSON_VALUE) @RequiredArgsConstructor +@CrossOrigin(origins = "chrome-extension://doeamknhlolnflkmhbhkagganhjjbefe") public class BaekjoonController { private final BaekjoonService baekjoonService;