Merge branch '6.3.x'

This commit is contained in:
Josh Cummings 2024-09-10 12:51:08 -06:00
commit 9b6ac637c9
No known key found for this signature in database
GPG Key ID: A306A51F43B8E5A5
2 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@ Java::
[source,java,role="primary"] [source,java,role="primary"]
---- ----
@Bean @Bean
CorsConfigurationSource corsConfigurationSource() { UrlBasedCorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration(); CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(Arrays.asList("https://example.com")); configuration.setAllowedOrigins(Arrays.asList("https://example.com"));
configuration.setAllowedMethods(Arrays.asList("GET","POST")); configuration.setAllowedMethods(Arrays.asList("GET","POST"));
@ -32,7 +32,7 @@ Kotlin::
[source,kotlin,role="secondary"] [source,kotlin,role="secondary"]
---- ----
@Bean @Bean
fun corsConfigurationSource(): CorsConfigurationSource { fun corsConfigurationSource(): UrlBasedCorsConfigurationSource {
val configuration = CorsConfiguration() val configuration = CorsConfiguration()
configuration.allowedOrigins = listOf("https://example.com") configuration.allowedOrigins = listOf("https://example.com")
configuration.allowedMethods = listOf("GET", "POST") configuration.allowedMethods = listOf("GET", "POST")

View File

@ -16,7 +16,7 @@ Java::
[source,java,role="primary"] [source,java,role="primary"]
---- ----
@Bean @Bean
CorsConfigurationSource corsConfigurationSource() { UrlBasedCorsConfigurationSource corsConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration(); CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(Arrays.asList("https://example.com")); configuration.setAllowedOrigins(Arrays.asList("https://example.com"));
configuration.setAllowedMethods(Arrays.asList("GET","POST")); configuration.setAllowedMethods(Arrays.asList("GET","POST"));
@ -31,7 +31,7 @@ Kotlin::
[source,kotlin,role="secondary"] [source,kotlin,role="secondary"]
---- ----
@Bean @Bean
fun corsConfigurationSource(): CorsConfigurationSource { fun corsConfigurationSource(): UrlBasedCorsConfigurationSource {
val configuration = CorsConfiguration() val configuration = CorsConfiguration()
configuration.allowedOrigins = listOf("https://example.com") configuration.allowedOrigins = listOf("https://example.com")
configuration.allowedMethods = listOf("GET", "POST") configuration.allowedMethods = listOf("GET", "POST")
@ -147,7 +147,7 @@ public class WebSecurityConfig {
return http.build(); return http.build();
} }
CorsConfigurationSource apiConfigurationSource() { UrlBasedCorsConfigurationSource apiConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration(); CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(Arrays.asList("https://api.example.com")); configuration.setAllowedOrigins(Arrays.asList("https://api.example.com"));
configuration.setAllowedMethods(Arrays.asList("GET","POST")); configuration.setAllowedMethods(Arrays.asList("GET","POST"));
@ -156,7 +156,7 @@ public class WebSecurityConfig {
return source; return source;
} }
CorsConfigurationSource myWebsiteConfigurationSource() { UrlBasedCorsConfigurationSource myWebsiteConfigurationSource() {
CorsConfiguration configuration = new CorsConfiguration(); CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(Arrays.asList("https://example.com")); configuration.setAllowedOrigins(Arrays.asList("https://example.com"));
configuration.setAllowedMethods(Arrays.asList("GET","POST")); configuration.setAllowedMethods(Arrays.asList("GET","POST"));
@ -173,7 +173,7 @@ Kotlin::
[source,kotlin,role="secondary"] [source,kotlin,role="secondary"]
---- ----
@Bean @Bean
fun corsConfigurationSource(): CorsConfigurationSource { fun corsConfigurationSource(): UrlBasedCorsConfigurationSource {
val configuration = CorsConfiguration() val configuration = CorsConfiguration()
configuration.allowedOrigins = listOf("https://example.com") configuration.allowedOrigins = listOf("https://example.com")
configuration.allowedMethods = listOf("GET", "POST") configuration.allowedMethods = listOf("GET", "POST")