Files
server/src/Core/Utilities/CurrentContextMiddleware.cs

22 lines
571 B
C#
Raw Normal View History

2018-08-02 12:14:33 -04:00
using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;
namespace Bit.Core.Utilities
{
public class CurrentContextMiddleware
{
private readonly RequestDelegate _next;
public CurrentContextMiddleware(RequestDelegate next)
{
_next = next;
}
2019-01-25 00:01:24 -05:00
public async Task Invoke(HttpContext httpContext, CurrentContext currentContext, GlobalSettings globalSettings)
{
await currentContext.BuildAsync(httpContext, globalSettings);
await _next.Invoke(httpContext);
}
}
}