fix 修复Test环境Swagger不能访问问题
This commit is contained in:
@ -69,7 +69,14 @@ public class AdminHttpApiHostModule : AbpModule
|
||||
app.UseSwagger();
|
||||
app.UseAbpSwaggerUI(options =>
|
||||
{
|
||||
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Admin API");
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Admin API");
|
||||
}
|
||||
else
|
||||
{
|
||||
options.SwaggerEndpoint("/admin/swagger/v1/swagger.json", "Admin API");
|
||||
}
|
||||
|
||||
var configuration = context.GetConfiguration();
|
||||
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
|
||||
|
||||
Reference in New Issue
Block a user