Skip to content

Commit

Permalink
Add Referrer-Policy to HTTP Headers.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173526011
  • Loading branch information
juergw authored and cpovirk committed Oct 26, 2017
1 parent 570943f commit 19b4d97
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
27 changes: 27 additions & 0 deletions android/guava/src/com/google/common/net/HttpHeaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,33 @@ private HttpHeaders() {}
public static final String RANGE = "Range";
/** The HTTP {@code Referer} header field name. */
public static final String REFERER = "Referer";
/**
* The HTTP <a href="https://www.w3.org/TR/referrer-policy/">{@code Referrer-Policy}</a> header
* field name.
*
* @since NEXT
*/
public static final String REFERRER_POLICY = "Referrer-Policy";

/**
* Values for the <a href="https://www.w3.org/TR/referrer-policy/">{@code Referrer-Policy}</a>
* header.
*
* @since NEXT
*/
public static final class ReferrerPolicyValues {
private ReferrerPolicyValues() {}

public static final String NO_REFERRER = "no-referrer";
public static final String NO_REFFERER_WHEN_DOWNGRADE = "no-referrer-when-downgrade";
public static final String SAME_ORIGIN = "same-origin";
public static final String ORIGIN = "origin";
public static final String STRICT_ORIGIN = "strict-origin";
public static final String ORIGIN_WHEN_CROSS_ORIGIN = "origin-when-cross-origin";
public static final String STRICT_ORIGIN_WHEN_CROSS_ORIGIN = "strict-origin-when-cross-origin";
public static final String UNSAFE_URL = "unsafe-url";
}

/**
* The HTTP <a href="https://www.w3.org/TR/service-workers/#update-algorithm">
* {@code Service-Worker}</a> header field name.
Expand Down
27 changes: 27 additions & 0 deletions guava/src/com/google/common/net/HttpHeaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,33 @@ private HttpHeaders() {}
public static final String RANGE = "Range";
/** The HTTP {@code Referer} header field name. */
public static final String REFERER = "Referer";
/**
* The HTTP <a href="https://www.w3.org/TR/referrer-policy/">{@code Referrer-Policy}</a> header
* field name.
*
* @since NEXT
*/
public static final String REFERRER_POLICY = "Referrer-Policy";

/**
* Values for the <a href="https://www.w3.org/TR/referrer-policy/">{@code Referrer-Policy}</a>
* header.
*
* @since NEXT
*/
public static final class ReferrerPolicyValues {
private ReferrerPolicyValues() {}

public static final String NO_REFERRER = "no-referrer";
public static final String NO_REFFERER_WHEN_DOWNGRADE = "no-referrer-when-downgrade";
public static final String SAME_ORIGIN = "same-origin";
public static final String ORIGIN = "origin";
public static final String STRICT_ORIGIN = "strict-origin";
public static final String ORIGIN_WHEN_CROSS_ORIGIN = "origin-when-cross-origin";
public static final String STRICT_ORIGIN_WHEN_CROSS_ORIGIN = "strict-origin-when-cross-origin";
public static final String UNSAFE_URL = "unsafe-url";
}

/**
* The HTTP <a href="https://www.w3.org/TR/service-workers/#update-algorithm">
* {@code Service-Worker}</a> header field name.
Expand Down

0 comments on commit 19b4d97

Please sign in to comment.