[fix] 修改了跨域认证
This commit is contained in:
parent
4923396996
commit
cb28d1ae63
|
|
@ -58,7 +58,9 @@ public class SecurityConfig {
|
|||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.setAllowCredentials(true);
|
||||
config.setAllowedOrigins(Arrays.asList("http://localhost:9527", "http://localhost:8080","http://154.219.110.17:8080", "https://test.tju.edu.kg"));
|
||||
config.setAllowedOrigins(Arrays.asList("http://localhost:9527", "http://localhost:8080","http://154.219.110.17:8080", "https://test.tju.edu.kg","http://154.219.110.17:8081",
|
||||
"https://project-frontend.tju.edu.kg","https://project-backend.tju.edu.kg",
|
||||
"http://project-frontend.tju.edu.kg","http://project-backend.tju.edu.kg"));
|
||||
config.setAllowedHeaders(Arrays.asList("*"));
|
||||
config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS"));
|
||||
source.registerCorsConfiguration("/**", config);
|
||||
|
|
|
|||
Loading…
Reference in New Issue