|
1 | | -package com.together.backend.global.config; |
2 | | - |
3 | | -import org.springframework.context.annotation.Configuration; |
4 | | -import org.springframework.web.servlet.config.annotation.CorsRegistry; |
5 | | -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
6 | | - |
7 | | -@Configuration |
8 | | -public class CorsMvcConfig implements WebMvcConfigurer { |
9 | | - @Override |
10 | | - public void addCorsMappings(CorsRegistry corsRegistry) { |
11 | | - corsRegistry.addMapping("/**") |
12 | | - .allowedOrigins( |
13 | | - "http://localhost:3000", |
14 | | - "https://7-together.kro.kr" // 개발용 |
15 | | - ) |
16 | | - .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") |
17 | | - .allowedHeaders("*") |
18 | | - .exposedHeaders("Set- Cookie") |
19 | | - .allowCredentials(true); |
20 | | - } |
21 | | -} |
| 1 | +//package com.together.backend.global.config; |
| 2 | +// |
| 3 | +//import org.springframework.context.annotation.Configuration; |
| 4 | +//import org.springframework.web.servlet.config.annotation.CorsRegistry; |
| 5 | +//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| 6 | +// |
| 7 | +//@Configuration |
| 8 | +//public class CorsMvcConfig implements WebMvcConfigurer { |
| 9 | +// @Override |
| 10 | +// public void addCorsMappings(CorsRegistry corsRegistry) { |
| 11 | +// corsRegistry.addMapping("/**") |
| 12 | +// .allowedOrigins( |
| 13 | +// "http://localhost:3000", |
| 14 | +// "https://7-together.kro.kr" // 개발용 |
| 15 | +// ) |
| 16 | +// .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") |
| 17 | +// .allowedHeaders("*") |
| 18 | +// .exposedHeaders("Set- Cookie") |
| 19 | +// .allowCredentials(true); |
| 20 | +// } |
| 21 | +//} |
0 commit comments