Created
January 15, 2020 21:33
-
-
Save ankitvijay/da5d7a4771321204e4b3b95d28d92aa5 to your computer and use it in GitHub Desktop.
Startup after adding DefaultHeaderFilter to Swagger
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 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