I read this link How to Implement HSTS header in ASP.Net Core 6.0? which adds HSTS via the program.cs
file.
I read https://learn.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-7.0&tabs=visual-studio%2Clinux-ubuntu but no indication of adding it via the config file.
Is it possible to set HSTS via the config file (appSettings.json
or xxxx.json) rather than adding it programmatically?