Skip to content

Commit 1739549

Browse files
committed
Added PathBase WebMVC
1 parent d007770 commit 1739549

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<EnvironmentVariables>
2323
<EnvironmentVariable Name="ASPNETCORE_ENVIRONMENT" Value="Development"/>
2424
<EnvironmentVariable Name="ASPNETCORE_URLS" Value="http://0.0.0.0:80"/>
25+
<EnvironmentVariable Name="PATH_BASE" Value="/eShopOnServiceFabric/WebMVC"/>
2526
<EnvironmentVariable Name="CatalogUrl" Value="http://catalogapi.eshoponservicefabric:5101"/>
2627
<EnvironmentVariable Name="OrderingUrl" Value="http://orderingapi.eshoponservicefabric:5102"/>
2728
<EnvironmentVariable Name="BasketUrl" Value="http://basketapi.eshoponservicefabric:5103"/>

src/Web/WebMVC/Startup.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
123123
app.UseExceptionHandler("/Error");
124124
}
125125

126+
127+
if (!string.IsNullOrEmpty(Configuration["PATH_BASE"]))
128+
{
129+
app.UsePathBase(Configuration["PATH_BASE"]);
130+
}
131+
132+
126133
app.UseSession();
127134
app.UseStaticFiles();
128135

0 commit comments

Comments
 (0)