#update
This commit is contained in:
@@ -198,11 +198,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
// 关键:设置允许的前端源(替换为你的实际前端域名,如https://ri.satabot.com)
|
||||
// 填* 会有问题
|
||||
config.setAllowedOrigins(Arrays.asList("https://ri.satabot.com", "https://ai.satabot.com",
|
||||
"https://serviceai.satabot.com", "https://serviceri.satabot.com", "https://pvs.satabot.com",
|
||||
"https://servicepvs.satabot.com", "https://servicepathplan.satabot.com", "https://solar.satabot.com",
|
||||
"https://servicestream.satabot.com", "http://192.168.2.58", "http://192.168.2.58"));
|
||||
// config.addAllowedOriginPattern("*");
|
||||
// config.setAllowedOrigins(Arrays.asList("https://ri.satabot.com", "https://ai.satabot.com",
|
||||
// "https://serviceai.satabot.com", "https://serviceri.satabot.com", "https://pvs.satabot.com",
|
||||
// "https://servicepvs.satabot.com", "https://servicepathplan.satabot.com", "https://solar.satabot.com",
|
||||
// "https://servicestream.satabot.com", "http://192.168.2.58", "http://192.168.2.58"));
|
||||
config.addAllowedOriginPattern("*");
|
||||
// 允许的请求方法(必须包含OPTIONS,支持业务请求的GET/POST等)
|
||||
config.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS"));
|
||||
// 允许的请求头(*表示所有,若有自定义头可单独指定,如Token)
|
||||
|
||||
Reference in New Issue
Block a user