diff --git a/src/Services/Identity/Identity.API/Startup.cs b/src/Services/Identity/Identity.API/Startup.cs index 3bd0bbedc..22dd039a0 100644 --- a/src/Services/Identity/Identity.API/Startup.cs +++ b/src/Services/Identity/Identity.API/Startup.cs @@ -119,6 +119,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API else { app.UseExceptionHandler("/Home/Error"); + app.UseHsts(); } app.UseHttpsRedirection(); diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs index d6b044ce7..791ff0336 100644 --- a/src/Web/WebMVC/Startup.cs +++ b/src/Web/WebMVC/Startup.cs @@ -68,6 +68,7 @@ namespace Microsoft.eShopOnContainers.WebMVC else { app.UseExceptionHandler("/Error"); + app.UseHsts(); } var pathBase = Configuration["PATH_BASE"]; diff --git a/src/Web/WebSPA/Startup.cs b/src/Web/WebSPA/Startup.cs index 434ea3a97..c0c89f663 100644 --- a/src/Web/WebSPA/Startup.cs +++ b/src/Web/WebSPA/Startup.cs @@ -85,6 +85,10 @@ namespace eShopConContainers.WebSPA { app.UseDeveloperExceptionPage(); } + else + { + app.UseHsts(); + } app.UseHttpsRedirection();