From aa048746ba1cdbb55ee09bf3cc1944f44bf0b1ef Mon Sep 17 00:00:00 2001 From: Jinwoo Lee Date: Wed, 1 Nov 2023 15:04:30 +0900 Subject: [PATCH] fix: add cors-origins --- .../repl/gifthub/giftcard/controller/GiftcardController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/swmaestro/repl/gifthub/giftcard/controller/GiftcardController.java b/src/main/java/org/swmaestro/repl/gifthub/giftcard/controller/GiftcardController.java index 275e965c..5958d7c6 100644 --- a/src/main/java/org/swmaestro/repl/gifthub/giftcard/controller/GiftcardController.java +++ b/src/main/java/org/swmaestro/repl/gifthub/giftcard/controller/GiftcardController.java @@ -1,6 +1,7 @@ package org.swmaestro.repl.gifthub.giftcard.controller; 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.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -30,6 +31,7 @@ public class GiftcardController { @GetMapping("/{id}") @Operation(summary = "공유 정보 요청 메서드", description = "클라이언트에서 요청한 공유 정보를 전달하기 위한 메서드입니다.") + @CrossOrigin(origins = "http://seheon.kr, https://dev.gifthub.kr, https://gifthub.kr") @ApiResponses({ @ApiResponse(responseCode = "200", description = "공유하기 정보 조회 성공"), @ApiResponse(responseCode = "400", description = "만료된 공유하기 정보 접근"),