Skip to content

Commit

Permalink
Added PathBase WebMVC
Browse files Browse the repository at this point in the history
  • Loading branch information
ramon-tomas-c committed Sep 7, 2017
1 parent d007770 commit 1739549
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down
7 changes: 7 additions & 0 deletions src/Web/WebMVC/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
app.UseExceptionHandler("/Error");
}


if (!string.IsNullOrEmpty(Configuration["PATH_BASE"]))
{
app.UsePathBase(Configuration["PATH_BASE"]);
}


app.UseSession();
app.UseStaticFiles();

Expand Down

0 comments on commit 1739549

Please sign in to comment.