Reputation: 61
My issue is when the Strict Transport Security header is added, the Maui application won't load, it is stuck on 'Authorizing...'
I've added HTTP headers within the API program.cs using Middleware and I've also added the app.UseHsts();
with the configuration below.
I have also tried adding the header manually with the other headers in the Middleware but that also doesn't work.
I added the ExcludeHosts.Clear()
to make it work with localhost, I've also tried adding the Host of the Maui app.
Is there a way around this or a way to remove the Strict Transport Security header for Maui but not for Wasm?
builder.Services.AddHsts(options =>
{
options.ExcludedHosts.Clear();
options.ExcludedHosts.Add("http://0.0.0.0/");
options.Preload = true;
options.IncludeSubDomains = true;
options.MaxAge = TimeSpan.FromDays(730);
});
Upvotes: 0
Views: 355