Declare allowPrivateNetwork as available since 5.3.32

See gh-28546
See gh-31974
This commit is contained in:
Juergen Hoeller
2024-01-24 12:22:51 +01:00
parent b92877990d
commit 2f921dd13d
4 changed files with 10 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -120,7 +120,7 @@ public @interface CrossOrigin {
* Whether private network access is supported. Please, see
* {@link CorsConfiguration#setAllowPrivateNetwork(Boolean)} for details.
* <p>By default this is not set (i.e. private network access is not supported).
* @since 6.1.3
* @since 5.3.32
*/
String allowPrivateNetwork() default "";

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -478,7 +478,7 @@ public class CorsConfiguration {
* origins} and {@link #setAllowedOriginPatterns(List) originPatterns} are processed,
* see related API documentation for more details.
* <p>By default this is not set (i.e. private network access is not supported).
* @since 6.1.3
* @since 5.3.32
* @see <a href="https://wicg.github.io/private-network-access/">Private network access specifications</a>
*/
public void setAllowPrivateNetwork(@Nullable Boolean allowPrivateNetwork) {
@@ -487,7 +487,7 @@ public class CorsConfiguration {
/**
* Return the configured {@code allowPrivateNetwork} flag, or {@code null} if none.
* @since 6.1.3
* @since 5.3.32
* @see #setAllowPrivateNetwork(Boolean)
*/
@Nullable
@@ -582,7 +582,7 @@ public class CorsConfiguration {
* {@link #setAllowedOrigins allowedOrigins} does not contain the special
* value {@code "*"} since this is insecure.
* @throws IllegalArgumentException if the validation fails
* @since 6.1.3
* @since 5.3.32
*/
public void validateAllowPrivateNetwork() {
if (this.allowPrivateNetwork == Boolean.TRUE &&