Skip to content

Commit 6a36885

Browse files
committed
Enabling swagger for production.
1 parent ea80fad commit 6a36885

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

eFormAPI/eFormAPI.Web/Startup.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
198198
"default",
199199
"api/{controller=Home}/{action=Index}/{id?}");
200200
});
201-
if (env.IsDevelopment())
202-
{
203-
app.UseSwagger();
204-
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "API V1"); });
205-
}
201+
//if (env.IsDevelopment())
202+
//{
203+
// Since swagger is not accessible from outside the local server we do not need to disable it for production.
204+
app.UseSwagger();
205+
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "API V1"); });
206+
//}
206207

207208
// Plugins
208209
app.UseEFormPlugins(Plugins);

0 commit comments

Comments
 (0)