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

View File

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