Skip to content

Commit

Permalink
fix: CorsConfig AllowedOriginPattern μΆ”κ°€
Browse files Browse the repository at this point in the history
- κΈ°μ‘΄ μ½”λ“œλ₯Ό μˆ˜μ •ν•˜λ©΄μ„œ λˆ„λ½λœ μ•„λž˜ μ£Όμ†Œλ“€μ„ μΆ”κ°€ν•©λ‹ˆλ‹€.
- "http://192.168.0.*",
  "http://localhost:3000",
  "https://2024-beotkkotthon-team-24-fe.vercel.app",
  "https://reinput.info",
  "https://www.reinput.info
  • Loading branch information
MinhoJJang committed May 5, 2024
1 parent 7ba3796 commit 3dbf898
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/goorm/reinput/global/security/CorsConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ public class CorsConfig {
@Bean
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration config = new CorsConfiguration();
config.setAllowedOriginPatterns(Arrays.asList("http://192.168.0.*"));
config.setAllowedOriginPatterns(Arrays.asList(
"http://192.168.0.*",
"http://localhost:3000",
"https://2024-beotkkotthon-team-24-fe.vercel.app",
"https://reinput.info",
"https://www.reinput.info"));
config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"));
config.setAllowedHeaders(Arrays.asList("Authorization", "Cache-Control", "Content-Type"));
config.setAllowCredentials(true);
Expand Down

0 comments on commit 3dbf898

Please sign in to comment.