Add comments regarding HSTS max age

This commit is contained in:
Ryan Brandenburg 2018-08-20 11:02:34 -07:00
parent d9e71527e8
commit 11c6ebea2e
8 changed files with 9 additions and 1 deletions

View File

@ -147,6 +147,7 @@ namespace Company.WebApplication1
{
app.UseExceptionHandler("/Error");
#if (RequiresHttps)
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

View File

@ -146,6 +146,7 @@ namespace Company.WebApplication1
{
app.UseExceptionHandler("/Home/Error");
#if (RequiresHttps)
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

View File

@ -31,6 +31,7 @@ type Startup private () =
else
app.UseExceptionHandler("/Home/Error") |> ignore
#if (!NoHttps)
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts() |> ignore
app.UseHttpsRedirection() |> ignore

View File

@ -56,6 +56,7 @@ namespace Company.WebApplication1
#if (RequiresHttps)
else
{
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

View File

@ -29,6 +29,7 @@ type Startup private () =
app.UseDeveloperExceptionPage() |> ignore
#if (!NoHttps)
else
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts() |> ignore
app.UseHttpsRedirection() |> ignore
@ -37,4 +38,4 @@ type Startup private () =
#endif
app.UseMvc() |> ignore
member val Configuration : IConfiguration = null with get, set
member val Configuration : IConfiguration = null with get, set

View File

@ -42,6 +42,7 @@ namespace Company.WebApplication1
{
app.UseExceptionHandler("/Error");
#if (!NoHttps)
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

View File

@ -42,6 +42,7 @@ namespace Company.WebApplication1
{
app.UseExceptionHandler("/Error");
#if (!NoHttps)
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}

View File

@ -42,6 +42,7 @@ namespace Company.WebApplication1
{
app.UseExceptionHandler("/Error");
#if (!NoHttps)
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}