Как отключить swashbuckle swagger UI в production in ASP.NET веб-апи2?
I using swashbuckle v 5.6.0 for api documentation and ui for test in asp.net web api2. I do not want give ability for the user to post data from swagger ui in production. How do I disable it?
Что я уже пробовал:
GlobalConfiguration.Configuration .EnableSwagger(c => { c.Schemes(new[] { "http", "https" }); c.SingleApiVersion("v1", ""Demo API"); c.PrettyPrint(); c.IncludeXmlComments(GetXmlCommentsPath()); }) .EnableSwaggerUi(c => { c.DisableValidator(); });