title: ASP.NET Core 6 register global exception filter from library
body: <p>In my ASP.NET Core 6 application, I usually register filters inside the call to <code>builder.Services.AddControllers</code> by adding to the <code>Filters</code> array.  If I'm writing a reusable library, and that library wants to automatically register a filter, how would I do that?  While I can of course tell consumers to manually add the filter themselves, I'd rather have it in a registration extension on the <code>IServiceCollection</code> object.</p>
  <p>Back in the WebAPI days, for example, there was a <code>GlobalConfiguration</code> type object that could be used.</p>