Skip to content

Commit

Permalink
dotnet-architecture#510 fixed static images behind path-based proxy (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mykola authored Feb 16, 2021
1 parent 1dd3979 commit 1131617
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ public void ConfigureServices(IServiceCollection services)
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
var catalogBaseUrl = Configuration.GetValue(typeof(string), "CatalogBaseUrl") as string;
if (!string.IsNullOrEmpty(catalogBaseUrl))
{
app.Use((context, next) =>
{
context.Request.PathBase = new PathString(catalogBaseUrl);
return next();
});
}

app.UseHealthChecks("/health",
new HealthCheckOptions
{
Expand Down

0 comments on commit 1131617

Please sign in to comment.