title: Disable Not Authorized Redirect to Account/Login in ASP.NET Core
body: <p>I have a set of WebAPI services in a shared library.  These are used in an ASP.NET Core MVC Web Site and dedicated server only hosting the WebAPI Services without the MVC component.</p>
  
  <p>Everything works as expected on the MVC Web Site with Unauthorized Requests, I get the 304 redirect to the login page (Account/Login). However when I make an unauthorized request to the WebAPI services, I receive the same 304 redirect to /Account/Login in this case I would like to return the Http 401 Unauthorized result code.  I would prefer to not handle this in a custom AuthorizeAttribute but would rather handle at the site level in my Startup class.</p>