Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Startup after adding DefaultHeaderFilter to Swagger
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "My Awesome Application", Version = "v1" });
c.OperationFilter<DefaultHeaderFilter>();
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment