mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 06:22:50 +08:00
Added pre query string middleware function so users can run there own query string logic before ocelot does its mappings
This commit is contained in:
parent
92c182df00
commit
5afcebe7cb
@ -34,5 +34,11 @@
|
|||||||
/// This allows the user to completely override the ocelot authorisation middleware
|
/// This allows the user to completely override the ocelot authorisation middleware
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Func<HttpContext, Func<Task>, Task> AuthorisationMiddleware { get; set; }
|
public Func<HttpContext, Func<Task>, Task> AuthorisationMiddleware { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This allows the user to implement there own query string manipulation logic
|
||||||
|
/// </summary>
|
||||||
|
public Func<HttpContext, Func<Task>, Task> PreQueryStringBuilderMiddleware { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -90,6 +90,9 @@ namespace Ocelot.Middleware
|
|||||||
// Now we can run any header transformation logic
|
// Now we can run any header transformation logic
|
||||||
builder.UseHttpRequestHeadersBuilderMiddleware();
|
builder.UseHttpRequestHeadersBuilderMiddleware();
|
||||||
|
|
||||||
|
// Allow the user to implement their own query string manipulation logic
|
||||||
|
builder.UseIfNotNull(middlewareConfiguration.PreQueryStringBuilderMiddleware);
|
||||||
|
|
||||||
// Now we can run any query string transformation logic
|
// Now we can run any query string transformation logic
|
||||||
builder.UseQueryStringBuilderMiddleware();
|
builder.UseQueryStringBuilderMiddleware();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user