Enum Class SecurityHeaders.ReferrerPolicy

java.lang.Object
java.lang.Enum<SecurityHeaders.ReferrerPolicy>
cloud.opencode.base.web.security.SecurityHeaders.ReferrerPolicy
All Implemented Interfaces:
Serializable, Comparable<SecurityHeaders.ReferrerPolicy>, Constable
Enclosing class:
SecurityHeaders

public static enum SecurityHeaders.ReferrerPolicy extends Enum<SecurityHeaders.ReferrerPolicy>
Referrer-Policy header values. Referrer-Policy 头部值。
Since:
JDK 25, opencode-base-web V1.0.3
Author:
Leon Soo www.LeonSoo.com
  • Enum Constant Details

    • NO_REFERRER

      public static final SecurityHeaders.ReferrerPolicy NO_REFERRER
      No referrer information is sent - 不发送来源信息
    • NO_REFERRER_WHEN_DOWNGRADE

      public static final SecurityHeaders.ReferrerPolicy NO_REFERRER_WHEN_DOWNGRADE
      Referrer sent for same-protocol navigations - 同协议导航时发送来源
    • ORIGIN

      public static final SecurityHeaders.ReferrerPolicy ORIGIN
      Only the origin is sent as referrer - 仅发送来源域
    • ORIGIN_WHEN_CROSS_ORIGIN

      public static final SecurityHeaders.ReferrerPolicy ORIGIN_WHEN_CROSS_ORIGIN
      Full URL for same-origin, origin for cross-origin - 同源发送完整 URL,跨域仅发送来源域
    • SAME_ORIGIN

      public static final SecurityHeaders.ReferrerPolicy SAME_ORIGIN
      Full URL for same-origin, no referrer for cross-origin - 同源发送完整 URL,跨域不发送
    • STRICT_ORIGIN

      public static final SecurityHeaders.ReferrerPolicy STRICT_ORIGIN
      Origin for cross-origin HTTPS requests only - 仅跨域 HTTPS 请求发送来源域
    • STRICT_ORIGIN_WHEN_CROSS_ORIGIN

      public static final SecurityHeaders.ReferrerPolicy STRICT_ORIGIN_WHEN_CROSS_ORIGIN
      Full URL for same-origin, origin for secure cross-origin - 同源发送完整 URL,安全跨域发送来源域
    • UNSAFE_URL

      public static final SecurityHeaders.ReferrerPolicy UNSAFE_URL
      Full URL always - 始终发送完整 URL
  • Method Details

    • values

      public static SecurityHeaders.ReferrerPolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SecurityHeaders.ReferrerPolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • value

      public String value()
      Returns the header value. 返回头部值。
      Returns:
      the value - 头部值