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?