1
0
mirror of https://github.com/bitwarden/server synced 2025-12-24 20:23:21 +00:00
Files
server/src/Core/Utilities/CurrentContextMiddleware.cs
2019-01-25 00:01:24 -05:00

22 lines
560 B
C#

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, GlobalSettings globalSettings)
{
currentContext.Build(httpContext, globalSettings);
await _next.Invoke(httpContext);
}
}
}