From e9a02f5ba14afb413e4e39eb89bc41445ca0d91a Mon Sep 17 00:00:00 2001
From: liaoxujun@qq.com <liaoxujun@qq.com>
Date: 星期一, 28 八月 2023 11:17:28 +0800
Subject: [PATCH] 修正iis启动取消https端口

---
 DocumentFile.Service/Program.cs |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/DocumentFile.Service/Program.cs b/DocumentFile.Service/Program.cs
index b808f8e..17cc37e 100644
--- a/DocumentFile.Service/Program.cs
+++ b/DocumentFile.Service/Program.cs
@@ -37,11 +37,14 @@
 var app = builder.Build();
 
 // Configure the HTTP request pipeline.
-if (app.Environment.IsDevelopment())
+app.UseSwagger();
+app.UseSwaggerUI(c =>
 {
-    app.UseSwagger();
-    app.UseSwaggerUI();
-}
+    c.SwaggerEndpoint("/swagger/v1/swagger.json", "V1 Docs");
+    c.RoutePrefix = string.Empty;
+    c.DocExpansion(Swashbuckle.AspNetCore.SwaggerUI.DocExpansion.None);
+    c.DefaultModelsExpandDepth(-1);
+});
 
 app.UseHttpsRedirection();
 

--
Gitblit v1.9.1