Skip to content

Commit 6dabbdf

Browse files
java-team-github-botGoogle Java Core Libraries
authored andcommitted
Add Access-Control-Allow-Private-Network header to common library.
https://developer.chrome.com/blog/private-network-access-update RELNOTES=`net`: Added `HttpHeaders` constant for `Access-Control-Allow-Private-Network`. PiperOrigin-RevId: 426407160
1 parent bd932e5 commit 6dabbdf

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

android/guava/src/com/google/common/net/HttpHeaders.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ private ReferrerPolicyValues() {}
199199
public static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
200200
/** The HTTP {@code Access-Control-Allow-Origin} header field name. */
201201
public static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
202+
/**
203+
* The HTTP <a href="https://wicg.github.io/private-network-access/#headers">{@code
204+
* Access-Control-Allow-Private-Network}</a> header field name.
205+
*
206+
* @since NEXT
207+
*/
208+
public static final String ACCESS_CONTROL_ALLOW_PRIVATE_NETWORK =
209+
"Access-Control-Allow-Private-Network";
202210
/** The HTTP {@code Access-Control-Allow-Credentials} header field name. */
203211
public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
204212
/** The HTTP {@code Access-Control-Expose-Headers} header field name. */

guava/src/com/google/common/net/HttpHeaders.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ private ReferrerPolicyValues() {}
199199
public static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
200200
/** The HTTP {@code Access-Control-Allow-Origin} header field name. */
201201
public static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
202+
/**
203+
* The HTTP <a href="https://wicg.github.io/private-network-access/#headers">{@code
204+
* Access-Control-Allow-Private-Network}</a> header field name.
205+
*
206+
* @since NEXT
207+
*/
208+
public static final String ACCESS_CONTROL_ALLOW_PRIVATE_NETWORK =
209+
"Access-Control-Allow-Private-Network";
202210
/** The HTTP {@code Access-Control-Allow-Credentials} header field name. */
203211
public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
204212
/** The HTTP {@code Access-Control-Expose-Headers} header field name. */

0 commit comments

Comments
 (0)