-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReverseProxyOptions.cs
39 lines (34 loc) · 1.12 KB
/
ReverseProxyOptions.cs
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
namespace Fhi.ReverseProxyMiddleware;
/// <summary>
/// Initializes a new instance of the <see cref="ReverseProxyOptions"/> class.
/// </summary>
public class ReverseProxyOptions
{
/// <summary>
/// The name of the HttpClient to use for the proxy.
/// </summary>
public string HttpClientName { get; set; }
/// <summary>
/// Target path that the middleware will intercept; ie 'api'
/// </summary>
public string TargetPath { get; set; }
/// <summary>
/// List of allowed http methods separated by ';' (ie 'get;post')
/// By default all of them are allowed
/// </summary>
public string AllowedHttpMethods { get; set; }
/// <summary>
/// Whether to include the TargetPath in the reverse proxy call, default is true
/// </summary>
public bool IncludeTargetPath { get; set; }
/// <summary>
/// Constuctor
/// </summary>
public ReverseProxyOptions()
{
HttpClientName = string.Empty;
TargetPath = string.Empty;
IncludeTargetPath = true;
AllowedHttpMethods = "connect;delete;get;head;options;patch;post;put;trace";
}
}