Skip to content

Commit

Permalink
Merge pull request #14 from potenday-project/develop
Browse files Browse the repository at this point in the history
http://localhost:3000 도메인 허용
  • Loading branch information
HwangHoYoon authored Dec 14, 2023
2 parents 2b231e9 + ee16d40 commit 640c4e3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
18 changes: 18 additions & 0 deletions src/main/java/com/chwipoClova/common/config/WebMvcConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.chwipoClova.common.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@EnableWebMvc
public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:3000")
.allowedMethods("OPTIONS","GET","POST","PUT","DELETE");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
@Slf4j
@RestController
@RequiredArgsConstructor
@CrossOrigin(origins = "http://localhost:3000")
@Tag(name = "Interview", description = "면접 API")
@RequestMapping("interview")
public class InterviewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
@Slf4j
@RestController
@RequiredArgsConstructor
@CrossOrigin(origins = "http://localhost:3000")
@Tag(name = "Resume", description = "이력서 API")
@RequestMapping("resume")
public class ResumeController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
@Slf4j
@RestController
@RequiredArgsConstructor
@CrossOrigin(origins = "http://localhost:3000")
@Tag(name = "User", description = "유저 API")
@RequestMapping("user")
public class UserController {
Expand Down

0 comments on commit 640c4e3

Please sign in to comment.