Skip to content

Commit

Permalink
Set hsts preload to true and increase maxAge to 365 days (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzlyOwl authored Jul 3, 2024
1 parent 7ed3c2e commit 870488f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ public void ConfigureServices(IServiceCollection services)
});
services.AddHttpContextAccessor();

services.AddHsts(options => {
options.Preload = true;
options.IncludeSubDomains = true;
options.MaxAge = TimeSpan.FromDays(365);
});

services.AddAuthorization(options => { options.DefaultPolicy = SetupAuthorizationPolicyBuilder().Build(); });

services.AddMicrosoftIdentityWebAppAuthentication(Configuration);
Expand Down

0 comments on commit 870488f

Please sign in to comment.