Merge branch '6.3.x'
This commit is contained in:
commit
9b6ac637c9
|
@ -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")
|
||||||
|
|
|
@ -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")
|
||||||
|
|
Loading…
Reference in New Issue