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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
537 B
C#
Raw Normal View History

using Bit.Core.Context;
using Bit.Core.Settings;
2018-08-02 12:14:33 -04:00
using Microsoft.AspNetCore.Http;
2022-08-29 14:53:16 -04:00
namespace Bit.Core.Utilities;
public class CurrentContextMiddleware
{
2022-08-29 14:53:16 -04:00
private readonly RequestDelegate _next;
2022-08-29 14:53:16 -04:00
public CurrentContextMiddleware(RequestDelegate next)
{
_next = next;
}
2022-08-29 14:53:16 -04:00
public async Task Invoke(HttpContext httpContext, ICurrentContext currentContext, GlobalSettings globalSettings)
{
await currentContext.BuildAsync(httpContext, globalSettings);
await _next.Invoke(httpContext);
}
}