forked from dotnet/yarp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathYarpIngressOptions.cs
More file actions
67 lines (60 loc) · 2.12 KB
/
YarpIngressOptions.cs
File metadata and controls
67 lines (60 loc) · 2.12 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Collections.Generic;
using Yarp.ReverseProxy.Configuration;
namespace Yarp.Kubernetes.Controller.Converters;
internal sealed class YarpIngressOptions
{
public bool Https { get; set; }
public List<Dictionary<string, string>> Transforms { get; set; }
public string AuthorizationPolicy { get; set; }
public string RateLimiterPolicy { get; set; }
public string OutputCachePolicy { get; set; }
public SessionAffinityConfig SessionAffinity { get; set; }
public HttpClientConfig HttpClientConfig { get; set; }
public string LoadBalancingPolicy { get; set; }
public string CorsPolicy { get; set; }
public string TimeoutPolicy { get; set; }
public TimeSpan? Timeout { get; set; }
public HealthCheckConfig HealthCheck { get; set; }
public Dictionary<string, string> RouteMetadata { get; set; }
public List<RouteHeader> RouteHeaders { get; set; }
public List<RouteQueryParameter> RouteQueryParameters { get; set; }
public int? RouteOrder { get; set; }
public List<string> RouteMethods { get; set; }
}
internal sealed class RouteHeaderWrapper
{
public string Name { get; init; }
public List<string> Values { get; init; }
public HeaderMatchMode Mode { get; init; }
public bool IsCaseSensitive { get; init; }
public RouteHeader ToRouteHeader()
{
return new RouteHeader
{
Name = Name,
Values = Values,
Mode = Mode,
IsCaseSensitive = IsCaseSensitive
};
}
}
internal sealed class RouteQueryParameterWrapper
{
public string Name { get; init; }
public List<string> Values { get; init; }
public QueryParameterMatchMode Mode { get; init; }
public bool IsCaseSensitive { get; init; }
public RouteQueryParameter ToRouteQueryParameter()
{
return new RouteQueryParameter
{
Name = Name,
Values = Values,
Mode = Mode,
IsCaseSensitive = IsCaseSensitive
};
}
}