admin
2020-06-10 a610f2ab6e543d2cb78c1ef212ac6a74ddc067d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright © 2016 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
 
namespace CefSharp
{
    /// <summary>
    /// Policy for how the Referrer HTTP header value will be sent during navigation.
    /// If the `--no-referrers` command-line flag is specified then the policy value
    /// will be ignored and the Referrer value will never be sent.
    /// Must be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium.
    /// </summary>
    public enum ReferrerPolicy
    {
        /// <summary>
        /// Clear the referrer header if the header value is HTTPS but the request
        /// destination is HTTP. This is the default behavior.
        /// </summary>
        ClearReferrerOnTransitionFromSecureToInsecure,
 
        /// <summary>
        /// Default which is equivilent to <see cref="ClearReferrerOnTransitionFromSecureToInsecure"/>
        /// </summary>
        Default = ClearReferrerOnTransitionFromSecureToInsecure,
 
        /// <summary>
        /// A slight variant on <see cref="ClearReferrerOnTransitionFromSecureToInsecure"/>:
        /// If the request destination is HTTP, an HTTPS referrer will be cleared. If
        /// the request's destination is cross-origin with the referrer (but does not
        /// downgrade), the referrer's granularity will be stripped down to an origin
        /// rather than a full URL. Same-origin requests will send the full referrer.
        /// </summary>
        ReduceReferrerGranularityOnTransitionCrossOrigin,
 
        /// <summary>
        /// Strip the referrer down to an origin when the origin of the referrer is
        /// different from the destination's origin.
        /// </summary>
        OriginOnlyOnTransitionCrossOrigin,
 
        /// <summary>
        /// Never change the referrer.
        /// </summary>
        NeverClearReferrer,
 
        /// <summary>
        /// Strip the referrer down to the origin regardless of the redirect location.
        /// </summary>
        Origin,
 
        /// <summary>
        /// Clear the referrer when the request's referrer is cross-origin with the
        /// request's destination.
        /// </summary>
        ClearReferrerOnTransitionCrossOrigin,
 
        /// <summary>
        /// Strip the referrer down to the origin, but clear it entirely if the
        /// referrer value is HTTPS and the destination is HTTP.
        /// </summary>
        OriginClearOnTransitionFromSecureToInsecure,
 
        /// <summary>
        /// Always clear the referrer regardless of the request destination.
        /// </summary>
        NoReferrer,
 
        /// <summary>
        /// Always the last value in this enumeration.
        /// </summary>
        LastValue = NoReferrer,
    }
}