Skip to content

Instantly share code, notes, and snippets.

@thlemercier
Created August 17, 2020 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thlemercier/39fdf8e06d24ca57050d1cfe8a459053 to your computer and use it in GitHub Desktop.
Save thlemercier/39fdf8e06d24ca57050d1cfe8a459053 to your computer and use it in GitHub Desktop.
@Configuration
@EnableWebMvc
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("api/v1/**").allowedOrigins(
"http://127.0.0.1:8081",
"http://localhost:8081"
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment