Package com.oorian.security
Enum Class SecurityHeaders.ReferrerPolicy
- All Implemented Interfaces:
Serializable,Comparable<SecurityHeaders.ReferrerPolicy>,Constable
- Enclosing class:
SecurityHeaders
Options for the
Referrer-Policy header.- Since:
- 2.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNever send the Referrer header.Send no referrer when downgrading from HTTPS to HTTP.Always send only the origin.Send origin for cross-origin; full URL for same-origin.Send referrer only for same-origin requests.Send only the origin, never the path.Send only the origin (no path) for cross-origin; full URL for same-origin.Always send the full URL (not recommended). -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the header value string.Returns the enum constant of this class with the specified name.static SecurityHeaders.ReferrerPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_REFERRER
Never send the Referrer header. -
SAME_ORIGIN
Send referrer only for same-origin requests. -
STRICT_ORIGIN_WHEN_CROSS_ORIGIN
Send only the origin (no path) for cross-origin; full URL for same-origin. -
STRICT_ORIGIN
Send only the origin, never the path. -
ORIGIN_WHEN_CROSS_ORIGIN
Send origin for cross-origin; full URL for same-origin. -
ORIGIN
Always send only the origin. -
NO_REFERRER_WHEN_DOWNGRADE
Send no referrer when downgrading from HTTPS to HTTP. -
UNSAFE_URL
Always send the full URL (not recommended).
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getValue
Returns the header value string.- Returns:
- the header value
-