https://discord.umbraco.com logo
#help-with-umbraco
Umbraco 13 and app.UseHsts()
# help-with-umbraco
m

madhackersa

02/07/2024, 1:29 PM
I'm busy with a Umbraco 13 website and I need to add app.UseHsts() to the program.cs file. Where is the best place to add it, should it be before or after app.BootUmbracoAsync() if (app.Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } Any suggestions will be greatly appreciated.
e

eagle_f90

02/08/2024, 8:43 AM
I belive it should be after the app.BootUmbracoAsync() call. This is where I had to place my header changes to secure x-frame and x-content.
m

madhackersa

02/08/2024, 9:56 AM
awesome thank you