Is it possible to send values to controller from middleware in aspnet core api?
问题 I want to know if is it possible to send value from middleware to controllerAPI ? For example, I want catch one particular header and send to the controller. Something like that : public class UserTokenValidatorsMiddleware { private readonly RequestDelegate _next; //private IContactsRepository ContactsRepo { get; set; } public UserTokenValidatorsMiddleware(RequestDelegate next) { _next = next; } public async Task Invoke(HttpContext context) { if (!context.Request.Path.Value.Contains("auth"))