Added PathBase WebMVC

This commit is contained in:
Ramón Tomás 2017-09-07 13:39:13 +02:00
parent d00777008c
commit 17395497e5
2 changed files with 8 additions and 0 deletions

View File

@ -22,6 +22,7 @@
<EnvironmentVariables>
<EnvironmentVariable Name="ASPNETCORE_ENVIRONMENT" Value="Development"/>
<EnvironmentVariable Name="ASPNETCORE_URLS" Value="http://0.0.0.0:80"/>
<EnvironmentVariable Name="PATH_BASE" Value="/eShopOnServiceFabric/WebMVC"/>
<EnvironmentVariable Name="CatalogUrl" Value="http://catalogapi.eshoponservicefabric:5101"/>
<EnvironmentVariable Name="OrderingUrl" Value="http://orderingapi.eshoponservicefabric:5102"/>
<EnvironmentVariable Name="BasketUrl" Value="http://basketapi.eshoponservicefabric:5103"/>

View File

@ -123,6 +123,13 @@ namespace Microsoft.eShopOnContainers.WebMVC
app.UseExceptionHandler("/Error");
}
if (!string.IsNullOrEmpty(Configuration["PATH_BASE"]))
{
app.UsePathBase(Configuration["PATH_BASE"]);
}
app.UseSession();
app.UseStaticFiles();