Skip to content

Commit

Permalink
recfactor : cors 설정 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
MyunghyunNero committed Nov 21, 2023
1 parent d0fc797 commit d12b7d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/main/java/kusitms/gallae/config/WebMvcConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
public class WebMvcConfig implements WebMvcConfigurer {

public void addCorsMappings(CorsRegistry registry){
registry.addMapping("/**")
.allowedOrigins("http://localhost:3000")
.allowedMethods("OPTIONS", "GET", "POST", "PUT", "DELETE")
.allowedOrigins("http://localhost:8000")
.allowedMethods("OPTIONS", "GET", "POST", "PUT", "DELETE");;
registry.addMapping("/**").allowedMethods("*").allowedOriginPatterns("*");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public ResponseEntity<BaseResponse> delArchive(
Principal principal,

@Parameter(description = "자료실 아이디")
@RequestParam(value = "archiveId", required = false)
@RequestParam(value = "archiveId", required = true)
Long archiveId
){
if(principal == null ){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public ResponseEntity<BaseResponse> delReview(
Principal principal,

@Parameter(description = "후기 아이디")
@RequestParam(value = "reviewId", required = false)
@RequestParam(value = "reviewId", required = true)
Long reviewId
){
if(principal == null ){
Expand Down

0 comments on commit d12b7d5

Please sign in to comment.