From 8edfea5e311bbd165c73ad36d2a54d3a91532bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dhji=28=EC=A7=80=EB=8C=80=ED=95=9C=29?= Date: Tue, 14 Jun 2022 17:56:06 +0900 Subject: [PATCH] cors --- .../java/com/palnet/board/config/WebConfig.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main/java/com/palnet/board/config/WebConfig.java diff --git a/src/main/java/com/palnet/board/config/WebConfig.java b/src/main/java/com/palnet/board/config/WebConfig.java new file mode 100644 index 0000000..71f43f4 --- /dev/null +++ b/src/main/java/com/palnet/board/config/WebConfig.java @@ -0,0 +1,14 @@ +package com.palnet.board.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class WebConfig implements WebMvcConfigurer { + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") + .allowedOrigins("*"); + } +}