Closed sunmingtao closed 3 years ago
It's because the button at top right corner is loaded using ajax, and localhost:8081 is considered a different domain from localhost:8082.
The solution is enable cross domain, but only for 'local' profile.
Add a 'local' bean
@Bean @Profile("local") public WebMvcConfigurer corsConfigurer() { return new WebMvcConfigurer() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**").allowedOrigins("*").allowCredentials(true); } }; }
It's because the button at top right corner is loaded using ajax, and localhost:8081 is considered a different domain from localhost:8082.
The solution is enable cross domain, but only for 'local' profile.
Add a 'local' bean