diff --git a/src/FilterLists.Api/Startup.cs b/src/FilterLists.Api/Startup.cs index 3e3bf9628..4526fcca8 100644 --- a/src/FilterLists.Api/Startup.cs +++ b/src/FilterLists.Api/Startup.cs @@ -60,13 +60,16 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env) app.UseMvc(); app.UseSwagger(c => { + c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.Host = httpReq.Host.Value); +#if RELEASE c.PreSerializeFilters.Add((swaggerDoc, httpReq) => swaggerDoc.BasePath = "/api"); - c.RouteTemplate = "docs/{documentName}/swagger.json"; +#endif + c.RouteTemplate = "/docs/{documentName}/swagger.json"; UseLowercaseControllerNameInSwaggerHack(c); }); app.UseSwaggerUI(c => { - c.SwaggerEndpoint("v1/swagger.json", "FilterLists API v1"); + c.SwaggerEndpoint("/docs/v1/swagger.json", "FilterLists API v1"); c.DocumentTitle = "FilterLists API v1"; c.RoutePrefix = "docs"; }); diff --git a/src/FilterLists.Web/ClientApp/components/Layout.tsx b/src/FilterLists.Web/ClientApp/components/Layout.tsx index 089172cc4..39bd23043 100644 --- a/src/FilterLists.Web/ClientApp/components/Layout.tsx +++ b/src/FilterLists.Web/ClientApp/components/Layout.tsx @@ -21,7 +21,7 @@ export class Layout extends React.Component {

- API | GitHub | By Collin M. Barrett + API | GitHub | By Collin M. Barrett

;