Browse Source

#510 fixed static images behind path-based proxy (#511)

main
Mykola 5 years ago
committed by GitHub
parent
commit
1131617fde
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/Web/Startup.cs

10
src/Web/Startup.cs

@ -170,6 +170,16 @@ namespace Microsoft.eShopWeb.Web
// 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
{

Loading…
Cancel
Save