Skip to content

Commit

Permalink
GCS-28: add Strict-T Strict-Transport-Security headers
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusEnrique committed Nov 15, 2024
1 parent e192751 commit 3a0d6a3
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ public static void ConfigureApplicationBuilderServices(this IApplicationBuilder

if (!env.IsDevelopment())
{
app.Use(async (context, next) =>
{
context.Response.Headers["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains; preload";
await next();
});

app.UseExceptionHandler("/Error");
app.UseHsts();
}
Expand Down

0 comments on commit 3a0d6a3

Please sign in to comment.