From 64e1b29fa131f4e915d4d0f1f87f0dfc3e0c8a6d Mon Sep 17 00:00:00 2001 From: 18923810322 <1666941798@qq.com> Date: Fri, 15 May 2026 10:44:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86seageer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Properties/launchSettings.json | 20 +++++++++---------- src/WMS.Web.Api/Startup.cs | 4 +++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/WMS.Web.Api/Properties/launchSettings.json b/src/WMS.Web.Api/Properties/launchSettings.json index 8fc46a6e..2215dc14 100644 --- a/src/WMS.Web.Api/Properties/launchSettings.json +++ b/src/WMS.Web.Api/Properties/launchSettings.json @@ -7,16 +7,16 @@ "sslPort": 44388 } }, - //"$schema": "http://json.schemastore.org/launchsettings.json", - //"profiles": { - // "IIS Express": { - // "commandName": "IISExpress", - // "launchBrowser": true, - // "launchUrl": "swagger", - // "environmentVariables": { - // "ASPNETCORE_ENVIRONMENT": "Development" - // } - // }, + "$schema": "http://json.schemastore.org/launchsettings.json", + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, "WMS.Web.Api": { "commandName": "Project", "launchBrowser": false, diff --git a/src/WMS.Web.Api/Startup.cs b/src/WMS.Web.Api/Startup.cs index 59ca9588..57e40140 100644 --- a/src/WMS.Web.Api/Startup.cs +++ b/src/WMS.Web.Api/Startup.cs @@ -70,12 +70,14 @@ namespace WMS.Web.Api // SwaggerUI app.UseSwaggerUI(c => { - c.SwaggerEndpoint($"/swagger/v1/swagger.json", "WMS-Api"); + c.SwaggerEndpoint($"/swagger/v1/swagger1.json", "WMS-Api"); c.RoutePrefix = string.Empty; c.DocExpansion(DocExpansion.None); }); } + ///swagger/v1/swagger.json ±¾ÊÇÕâ¸ö + app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCors("AllowAllOrigin");