File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ public static void Main(string[] args)
27
27
} ) ;
28
28
29
29
// Add services to the container.
30
- builder . Services . AddSwaggerGen ( ) ;
31
- // builder.Services.AddSwaggerGen(c =>
32
- // {
33
- // c.SwaggerDoc("v1", new OpenApiInfo { Title = "DevBlog", Version = "v1" });
34
- // });
30
+ // builder.Services.AddSwaggerGen();
31
+ builder . Services . AddSwaggerGen ( c =>
32
+ {
33
+ c . SwaggerDoc ( "v1" , new OpenApiInfo { Title = "DevBlog" , Version = "v1" } ) ;
34
+ } ) ;
35
35
36
36
// builder.Services.AddControllersWithViews();
37
37
@@ -113,9 +113,12 @@ public static void Main(string[] args)
113
113
if ( ! app . Environment . IsDevelopment ( ) )
114
114
{
115
115
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
116
+ app . UseHsts ( ) ;
117
+ }
118
+ else
119
+ {
116
120
app . UseSwagger ( ) ;
117
121
app . UseSwaggerUI ( ) ;
118
- app . UseHsts ( ) ;
119
122
}
120
123
121
124
// ------------------- MIDDLEWARE -------------------------------
You can’t perform that action at this time.
0 commit comments