diff --git a/docs/modules/ROOT/pages/reactive/integrations/cors.adoc b/docs/modules/ROOT/pages/reactive/integrations/cors.adoc index 007cd01938..84b3a6faf0 100644 --- a/docs/modules/ROOT/pages/reactive/integrations/cors.adoc +++ b/docs/modules/ROOT/pages/reactive/integrations/cors.adoc @@ -17,7 +17,7 @@ Java:: [source,java,role="primary"] ---- @Bean -CorsConfigurationSource corsConfigurationSource() { +UrlBasedCorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); configuration.setAllowedOrigins(Arrays.asList("https://example.com")); configuration.setAllowedMethods(Arrays.asList("GET","POST")); @@ -32,7 +32,7 @@ Kotlin:: [source,kotlin,role="secondary"] ---- @Bean -fun corsConfigurationSource(): CorsConfigurationSource { +fun corsConfigurationSource(): UrlBasedCorsConfigurationSource { val configuration = CorsConfiguration() configuration.allowedOrigins = listOf("https://example.com") configuration.allowedMethods = listOf("GET", "POST") diff --git a/docs/modules/ROOT/pages/servlet/integrations/cors.adoc b/docs/modules/ROOT/pages/servlet/integrations/cors.adoc index a2262215ac..34bf7003cc 100644 --- a/docs/modules/ROOT/pages/servlet/integrations/cors.adoc +++ b/docs/modules/ROOT/pages/servlet/integrations/cors.adoc @@ -16,7 +16,7 @@ Java:: [source,java,role="primary"] ---- @Bean -CorsConfigurationSource corsConfigurationSource() { +UrlBasedCorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); configuration.setAllowedOrigins(Arrays.asList("https://example.com")); configuration.setAllowedMethods(Arrays.asList("GET","POST")); @@ -31,7 +31,7 @@ Kotlin:: [source,kotlin,role="secondary"] ---- @Bean -fun corsConfigurationSource(): CorsConfigurationSource { +fun corsConfigurationSource(): UrlBasedCorsConfigurationSource { val configuration = CorsConfiguration() configuration.allowedOrigins = listOf("https://example.com") configuration.allowedMethods = listOf("GET", "POST") @@ -147,7 +147,7 @@ public class WebSecurityConfig { return http.build(); } - CorsConfigurationSource apiConfigurationSource() { + UrlBasedCorsConfigurationSource apiConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); configuration.setAllowedOrigins(Arrays.asList("https://api.example.com")); configuration.setAllowedMethods(Arrays.asList("GET","POST")); @@ -156,7 +156,7 @@ public class WebSecurityConfig { return source; } - CorsConfigurationSource myWebsiteConfigurationSource() { + UrlBasedCorsConfigurationSource myWebsiteConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); configuration.setAllowedOrigins(Arrays.asList("https://example.com")); configuration.setAllowedMethods(Arrays.asList("GET","POST")); @@ -173,7 +173,7 @@ Kotlin:: [source,kotlin,role="secondary"] ---- @Bean -fun corsConfigurationSource(): CorsConfigurationSource { +fun corsConfigurationSource(): UrlBasedCorsConfigurationSource { val configuration = CorsConfiguration() configuration.allowedOrigins = listOf("https://example.com") configuration.allowedMethods = listOf("GET", "POST")