Skip to content

Commit

Permalink
Merge pull request #25 from 7th-UMC/feat/5
Browse files Browse the repository at this point in the history
Chore : CORS 설정
  • Loading branch information
hyeonda02 authored Aug 19, 2024
2 parents 05ae9a3 + 3cc2858 commit 604eddb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/hsu/umc/server/UMCConfiguration.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package hsu.umc.server;

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 UMCConfiguration implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("GET", "POST", "PATCH", "DELETE", "PUT")
.allowedHeaders("*");
}
}

0 comments on commit 604eddb

Please sign in to comment.