Skip to content

Instantly share code, notes, and snippets.

@ankitvijay
Created January 15, 2020 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankitvijay/da5d7a4771321204e4b3b95d28d92aa5 to your computer and use it in GitHub Desktop.
Save ankitvijay/da5d7a4771321204e4b3b95d28d92aa5 to your computer and use it in GitHub Desktop.
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