Skip to content

Commit

Permalink
Merge pull request #100 from nar0ng/bug/#12-server-error
Browse files Browse the repository at this point in the history
Bug/#12 server error
  • Loading branch information
nar0ng authored Aug 14, 2024
2 parents fe39c7c + 842efc5 commit 892856a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/cotato/growingpain/config/CorsConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package cotato.growingpain.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 CorsConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry corsRegistry) {
corsRegistry.addMapping("/**")
.exposedHeaders("Set-Cookie")
.allowedOrigins("*")
.allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS");
}
}

0 comments on commit 892856a

Please sign in to comment.