Dears ,
I got a strange issue on My Spring Boot Rest Services & angular JS, When VPN on, API throw 'No Access-Control-Allow-Origin' header is present on the requested resource' But Without VPN its working correctly .
@Configuration
public class CorsConfig {
@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurerAdapter() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**");
}
};
}
}