-
-
Save stevetalkscode/6d559be83d6c67268f8c6058be31da91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ | |
// other registrations elided for focus | |
app.UseMiddleware<LogUserAgentMiddleware>(); | |
// the next middleware after ours | |
app.UseEndpoints(endpoints => | |
{ | |
endpoints.MapControllers(); | |
}); | |
} | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddLogging(); | |
services.AddScoped<LogUserAgentMiddleware>(); | |
// other registrations elided for focus | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment