From 11c2894f59d8c758d9b7bb650df8a60291e7076b Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Fri, 26 Oct 2018 09:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9Aswagger=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E5=8F=91=E5=B8=83=E5=90=8E=E7=94=B1=E4=BA=8E=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=86PathBase=E5=AF=BC=E8=87=B4=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Startup.cs | 2 +- Bootstrap.Admin/appsettings.Development.json | 1 + Bootstrap.Admin/appsettings.json | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Bootstrap.Admin/Startup.cs b/Bootstrap.Admin/Startup.cs index 8b1f6f40..028b29b6 100644 --- a/Bootstrap.Admin/Startup.cs +++ b/Bootstrap.Admin/Startup.cs @@ -143,7 +143,7 @@ namespace Bootstrap.Admin app.UseSwagger(); app.UseSwaggerUI(c => { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "BootstrapAdmin API V1"); + c.SwaggerEndpoint($"{Configuration["SwaggerPathBase"]}/swagger/v1/swagger.json", "BootstrapAdmin API V1"); }); } } diff --git a/Bootstrap.Admin/appsettings.Development.json b/Bootstrap.Admin/appsettings.Development.json index 4cc5b29a..5ff31e11 100644 --- a/Bootstrap.Admin/appsettings.Development.json +++ b/Bootstrap.Admin/appsettings.Development.json @@ -15,6 +15,7 @@ "MaxFileCount": 1 } }, + "SwaggerPathBase": "", "AllowOrigins": "http://localhost:49823", "KeyPath": "..\\keys", "DisableAutomaticKeyGeneration": false, diff --git a/Bootstrap.Admin/appsettings.json b/Bootstrap.Admin/appsettings.json index 9ca0f324..d030e312 100644 --- a/Bootstrap.Admin/appsettings.json +++ b/Bootstrap.Admin/appsettings.json @@ -29,6 +29,7 @@ } } ], + "SwaggerPathBase": "/BA", "AllowOrigins": "http://localhost,http://10.15.63.218", "KeyPath": "D:\\App\\Web-App\\keys", "ApplicationName": "__bd__",