title: How can I stop a request in Ocelot's PreAuthenticationMiddleware?
body: <p>I have to do some checks on the request's jwt before ocelot authentication, so I'm doing them within the <a href="https://ocelot.readthedocs.io/en/latest/features/middlewareinjection.html" rel="nofollow noreferrer">PreAuthenticationMiddleware</a> like this:</p>
  
  <pre><code>var config = new OcelotPipelineConfiguration
  {
      PreAuthenticationMiddleware = async (ctx, next) =&gt;
      {
          var jwt = ctx.HttpContext.Request.Headers["Authorization"];
  
          if (jwtIsOk(jwt)) next.Invoke();
          // else ...
      }
  };
  
  app.UseOcelot(config).Wait();
  </code></pre>
  
  <p>Instead of not-invoking <code>next</code>, is it possible to return a custom response?</p>
  
  <p>I'd like to return a 401 error</p>