How can I enforce use of ssl secure connection via https for Blazor web assembly?
I tried adding
app.UseHttpsRedirection();
to Startup.cs of a server project (api) but that didnt do anything.
I want to enforce it for both api and client of blazor web assembly app.
EDIT
Since we are going back and forth if an app is secure enough if only API is secured, I would like to rephrase my question. How do I redirect a page from a http to https on initial start of blazor client?
How to enforce SSL on server side is described here: enforcing-ssl
But enforcing it for the client just makes little to no sense and i think there is no way to really force it!
Of cause you could wrap HttpClient
to only use https
, but there is not a single benefit i could imagine.