Created
September 13, 2017 03:03
-
-
Save wwwmarcos/daa46d74f15ee6fbe52450bdfad768f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebMvc | |
public class WebConfig extends WebMvcConfigurerAdapter { | |
@Override | |
public void addCorsMappings(CorsRegistry registry) { | |
registry.addMapping("/**") | |
.allowedOrigins("*") | |
.allowedMethods("PUT", "DELETE", "POST", "GET") | |
.allowCredentials(false) | |
.maxAge(3600); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment