Created
April 8, 2018 10:39
-
-
Save djhuistra/4da14903f3357a20cadbc1b515abd9de to your computer and use it in GitHub Desktop.
Application Configuration for CORS
This file contains 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
@SpringBootApplication | |
public class DPAService { | |
public static void main(String[] args) { | |
SpringApplication.run(DPAService.class, args); | |
} | |
@Bean | |
public WebMvcConfigurer corsConfigurer() { | |
return new WebMvcConfigurerAdapter() { | |
@Override | |
public void addCorsMappings(CorsRegistry registry) { | |
registry.addMapping("/**").allowedOrigins("*").allowedMethods("*"); | |
} | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment