-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7d0ac9
commit 6e1e189
Showing
2 changed files
with
37 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
package com.gdsc.pikpet.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 WebMvcConfig implements WebMvcConfigurer { | ||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
//모든 경로에 대해 | ||
registry.addMapping("/**") | ||
.allowedOriginPatterns("*") | ||
.allowedMethods("GET","POST","PUT","PATCH","DELETE","OPTIONS") | ||
.allowedHeaders("*") | ||
.allowCredentials(true) | ||
.maxAge(3600); | ||
} | ||
} | ||
//package com.gdsc.pikpet.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 WebMvcConfig implements WebMvcConfigurer { | ||
// @Override | ||
// public void addCorsMappings(CorsRegistry registry) { | ||
// //모든 경로에 대해 | ||
// registry.addMapping("/**") | ||
// .allowedOriginPatterns("*") | ||
// .allowedMethods("GET","POST","PUT","PATCH","DELETE","OPTIONS") | ||
// .allowedHeaders("*") | ||
// .allowCredentials(true) | ||
// .maxAge(3600); | ||
// } | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters