Skip to content

Commit ea1e312

Browse files
authored
Merge pull request #342 from ryancyq/patch-12
Fix swagger endpoint url
2 parents 7af5626 + 077c66c commit ea1e312

File tree

1 file changed

+1
-1
lines changed
  • aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/Startup

1 file changed

+1
-1
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/Startup/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
119119
// Enable middleware to serve swagger-ui assets (HTML, JS, CSS etc.)
120120
app.UseSwaggerUI(options =>
121121
{
122-
options.SwaggerEndpoint(_appConfiguration["App:ServerRootAddress"] + "/swagger/v1/swagger.json", "AbpProjectName API V1");
122+
options.SwaggerEndpoint(_appConfiguration["App:ServerRootAddress"].EnsureEndsWith('/') + "swagger/v1/swagger.json", "AbpProjectName API V1");
123123
options.IndexStream = () => Assembly.GetExecutingAssembly()
124124
.GetManifestResourceStream("AbpCompanyName.AbpProjectName.Web.Host.wwwroot.swagger.ui.index.html");
125125
}); // URL: /swagger

0 commit comments

Comments
 (0)