proto及 rtss cros配置(修改基于boot 2.7)

This commit is contained in:
tiger_zhou 2023-02-20 16:58:23 +08:00
parent 7ce998f117
commit c38d4748d5
1 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,8 @@ public class CrosConfiguration {
private CorsConfiguration buildConfig() {
CorsConfiguration corsConfiguration = new CorsConfiguration();
corsConfiguration.addAllowedOrigin("*"); // 1
corsConfiguration.addAllowedOriginPattern("*");
// corsConfiguration.addAllowedOrigin("*"); // 1
corsConfiguration.addAllowedHeader("*"); // 2
corsConfiguration.addAllowedMethod("*"); // 3
corsConfiguration.setAllowCredentials(true);
@ -25,4 +26,4 @@ public class CrosConfiguration {
return new CorsFilter(source);
}
}
}