-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHttpClientHintsOptions.cs
More file actions
51 lines (43 loc) · 2.06 KB
/
HttpClientHintsOptions.cs
File metadata and controls
51 lines (43 loc) · 2.06 KB
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
// Copyright © https://myCSharp.de - all rights reserved
namespace MyCSharp.HttpClientHints.AspNetCore;
/// <summary>
/// Provides configuration options for HTTP client hints.
/// </summary>
public class HttpClientHintsOptions
{
/// <summary>
/// Gets or sets a value indicating whether to include the user agent in HTTP client hints.
/// </summary>
/// <value><c>true</c> to include the user agent; otherwise, <c>false</c>.</value>
public bool UserAgent { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether to include platform information in HTTP client hints.
/// </summary>
/// <value><c>true</c> to include platform information; otherwise, <c>false</c>.</value>
public bool Platform { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether to include architecture information in HTTP client hints.
/// </summary>
/// <value><c>true</c> to include architecture information; otherwise, <c>false</c>.</value>
public bool Architecture { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether to include device information in HTTP client hints.
/// </summary>
/// <value><c>true</c> to include device information; otherwise, <c>false</c>.</value>
public bool Device { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether to include mobile device indication in HTTP client hints.
/// </summary>
/// <value><c>true</c> to indicate a mobile device; otherwise, <c>false</c>.</value>
public bool Mobile { get; set; } = true;
/// <summary>
/// Gets or sets additional client hint headers to include.
/// </summary>
/// <value>A string specifying additional headers, or <c>null</c> if none.</value>
public string[]? Additional { get; set; }
/// <summary>
/// Gets or sets the lifetime of the HTTP client hints.
/// </summary>
/// <value>A <see cref="TimeSpan"/> indicating the hints' duration, or <c>null</c> if unspecified.</value>
public TimeSpan? Lifetime { get; set; }
}