Commit ecd567de authored by ilushka85's avatar ilushka85

pass full args to Get Proxy Functions

parent 8580aaac
...@@ -24,13 +24,13 @@ namespace Titanium.Web.Proxy ...@@ -24,13 +24,13 @@ namespace Titanium.Web.Proxy
set; set;
} }
//parameter is list of headers //parameter is list of headers
public Func<IEnumerable<HttpHeader>, Task<ExternalProxy>> GetCustomUpStreamHttpProxyFunc public Func<SessionEventArgs, Task<ExternalProxy>> GetCustomUpStreamHttpProxyFunc
{ {
get; get;
set; set;
} }
//parameter is list of headers //parameter is list of headers
public Func<IEnumerable<HttpHeader>, Task<ExternalProxy>> GetCustomUpStreamHttpsProxyFunc public Func<SessionEventArgs, Task<ExternalProxy>> GetCustomUpStreamHttpsProxyFunc
{ {
get; get;
set; set;
......
...@@ -435,7 +435,7 @@ namespace Titanium.Web.Proxy ...@@ -435,7 +435,7 @@ namespace Titanium.Web.Proxy
{ {
if (GetCustomUpStreamHttpProxyFunc != null) if (GetCustomUpStreamHttpProxyFunc != null)
{ {
customUpStreamHttpProxy = await GetCustomUpStreamHttpProxyFunc(args.WebSession.Request.RequestHeaders.Values).ConfigureAwait(false); customUpStreamHttpProxy = await GetCustomUpStreamHttpProxyFunc(args).ConfigureAwait(false);
} }
} }
else else
...@@ -446,7 +446,7 @@ namespace Titanium.Web.Proxy ...@@ -446,7 +446,7 @@ namespace Titanium.Web.Proxy
{ {
connectHeaders.Add(header); connectHeaders.Add(header);
} }
customUpStreamHttpsProxy = await GetCustomUpStreamHttpsProxyFunc(connectHeaders).ConfigureAwait(false); customUpStreamHttpsProxy = await GetCustomUpStreamHttpsProxyFunc(args).ConfigureAwait(false);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment