forked from Cookies_Github_mirror/AquaDX
[general] Add a simple boot checker and add debug message
This commit is contained in:
@@ -10,6 +10,7 @@ import org.springframework.web.cors.CorsConfigurationSource;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
@@ -21,8 +22,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
@Bean
|
||||
CorsConfigurationSource corsConfigurationSource() {
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.setAllowedOrigins(Arrays.asList("*"));
|
||||
config.setAllowedHeaders(Arrays.asList("*"));
|
||||
config.setAllowedOrigins(Collections.singletonList("*"));
|
||||
config.setAllowedHeaders(Collections.singletonList("*"));
|
||||
config.setAllowedMethods(Arrays.asList("GET", "PUT", "POST", "DELETE", "OPTIONS"));
|
||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
source.registerCorsConfiguration("/api/**", config);
|
||||
|
||||
Reference in New Issue
Block a user