Skip to content

Commit

Permalink
cors mapping added
Browse files Browse the repository at this point in the history
  • Loading branch information
harshjohar committed Feb 1, 2024
1 parent 77fc994 commit e0cf35f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurer() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**");
registry.addMapping("/**")
.allowedOriginPatterns("*")
.allowedMethods("*")
.allowedHeaders("*")
.exposedHeaders("Authorization")
.allowCredentials(true)
.maxAge(3600L);
;
}
};
}
Expand Down

0 comments on commit e0cf35f

Please sign in to comment.