From 79017d7a437aba0e3c08936edbb01718877a6edf Mon Sep 17 00:00:00 2001 From: H Vs Date: Fri, 3 Nov 2023 17:58:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HealthMonitor.WebApi/Program.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/HealthMonitor.WebApi/Program.cs b/HealthMonitor.WebApi/Program.cs index 525d5b1..3f91541 100644 --- a/HealthMonitor.WebApi/Program.cs +++ b/HealthMonitor.WebApi/Program.cs @@ -236,13 +236,15 @@ namespace HealthMonitor.WebApi - //if (!app.Environment.IsDebugOrDevelop()) - //{ - // prefix = optConfigAppSettings.Value.NginxPrefix; - // if (string.IsNullOrWhiteSpace(prefix)) prefix = SERVICE_PREFIX; - //} + if (!app.Environment.IsDevelopment()) + { + //prefix = optConfigAppSettings.Value.NginxPrefix; + //if (string.IsNullOrWhiteSpace(prefix)) prefix = SERVICE_PREFIX; + prefix = "hm"; + } // Enable middleware to serve generated Swagger as a JSON endpoint. + app.UseSwagger(c => { c.PreSerializeFilters.Add((swagger, httpReq) =>