Swagger index prepends configured baseurl

This commit is contained in:
Austin Jackson 2019-05-23 13:33:36 -05:00
commit ba1e96e5c0
No known key found for this signature in database
GPG key ID: 0FC6E6CE7B9D863B

7
src/Ombi/Startup.cs Normal file → Executable file
View file

@ -216,8 +216,15 @@ namespace Ombi
app.UseCors("MyPolicy");
app.UseSwagger();
app.UseSwaggerUI(c =>
{
if (settings.BaseUrl.HasValue())
{
c.SwaggerEndpoint(settings.BaseUrl + "/swagger/v1/swagger.json", "My API V1");
}
else
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
}
});
app.UseMvc(routes =>