ReferrerPolicy enum

The Referrer-Policy controls how much referrer information (sent with the Referer header) should be included with requests.

Inheritance

Constructors

ReferrerPolicy(String value)
const

Values

noReferrer → const ReferrerPolicy

The Referer header will not be sent.

const ReferrerPolicy('no-referrer')
noReferrerWhenDowngrade → const ReferrerPolicy

The Referer header will not be sent to origins without TLS (HTTPS).

const ReferrerPolicy('no-referrer-when-downgrade')
origin → const ReferrerPolicy

The sent referrer will be limited to the origin of the referring page: its scheme, host, and port.

const ReferrerPolicy('origin')
originWhenCrossOrigin → const ReferrerPolicy

The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.

const ReferrerPolicy('origin-when-cross-origin')
sameOrigin → const ReferrerPolicy

A referrer will be sent for same origin, but cross-origin requests will contain no referrer information.

const ReferrerPolicy('same-origin')
strictOrigin → const ReferrerPolicy

Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS→HTTPS), but don't send it to a less secure destination (HTTPS→HTTP).

const ReferrerPolicy('strict-origin')
strictOriginWhenCrossOrigin → const ReferrerPolicy

(default): Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS→HTTPS), and send no header to a less secure destination (HTTPS→HTTP).

const ReferrerPolicy('strict-origin-when-cross-origin')
unsafeUrl → const ReferrerPolicy

The referrer will include the origin and the path (but not the fragment, password, or username). This value is unsafe, because it leaks origins and paths from TLS-protected resources to insecure origins.

const ReferrerPolicy('unsafe-url')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<ReferrerPolicy>
A constant List of the values in this enum, in order of their declaration.