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

22 lines
513 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;
}
public async Task Invoke(HttpContext httpContext, CurrentContext currentContext)
{
2018-08-02 12:14:33 -04:00
currentContext.Build(httpContext);
await _next.Invoke(httpContext);
}
}
}