Last active
June 30, 2020 09:01
-
-
Save PradeepLoganathan/0285fbdaabdf5e195a675e2f7f855725 to your computer and use it in GitHub Desktop.
Adding HSTS to the middleware pipeline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| // ... | |
| services.AddHsts(options => | |
| { | |
| options.Preload = true; | |
| options.IncludeSubDomains = true; | |
| options.MaxAge = TimeSpan.FromDays(365); | |
| }); | |
| //.... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment