From 17395497e56b6eb3e8dcf151ea843b89ec7f7d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Tom=C3=A1s?= Date: Thu, 7 Sep 2017 13:39:13 +0200 Subject: [PATCH] Added PathBase WebMVC --- .../ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml | 1 + src/Web/WebMVC/Startup.cs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml index 7c8a341ed..184eeea4a 100644 --- a/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml +++ b/ServiceFabric/eShopOnServiceFabric/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -22,6 +22,7 @@ + diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index 8b10c1ecc..74a10c15e 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -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();