I'm hosting a blazor wasm app from an aspcore host like this
public void Configure(IApplicationBuilder app)
{
// ...
app.UseBlazorFrameworkFiles();
// ...
}
Now I want to deploy my app with docker. And I want to control the address for the backend of the blazor app from an environment variable.
So I've setup wwwroot/appsettings.json in my blazor project which works just as expected. Values get read at runtime. But they won't get overriden by the hosts environment variables.
Is there a way to pass a value down the line? I could read the environment variable in the host and pass it somehow else down. But the client needs to read it from the appsettings.json resource.
I probably could do it w/o the appsettings.json file and create a custom endpoint which returns a string. But I don't like that approach.