Skip to content

Commit 273dd53

Browse files
committed
Fix : CORS
1 parent 76a41f1 commit 273dd53

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/com/going/server/global/config/SwaggerConfig.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ public OpenAPI customOpenAPI() {
1717
.info(new Info()
1818
.title("Test SpringBoot API")
1919
.description("<h3>CapGoing API</h3>")
20-
.version("1.0.0"))
21-
.addServersItem(new Server().url("http://43.201.251.243:8000/")); // FastAPI 서버 추가
20+
.version("1.0.0")); // FastAPI 서버 추가
2221
}
2322

2423
@Bean
@@ -27,7 +26,7 @@ public WebMvcConfigurer corsConfigurer() {
2726
@Override
2827
public void addCorsMappings(CorsRegistry registry) {
2928
registry.addMapping("/**")
30-
.allowedOrigins("https://www.capgoing.shop", "https://capgoing.shop")
29+
.allowedOrigins("http://localhost:5173/","http://localhost:5173","https://www.capgoing.shop", "https://capgoing.shop")
3130
.allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS")
3231
.allowedHeaders("*")
3332
.allowCredentials(false);

0 commit comments

Comments
 (0)