Description
The Fiks IO client currently uses IHostEnvironment to decide which Fiks host to use:
|
private EnvironmentConfiguration GetConfiguration(AppIdentifier appIdentifier) |
|
{ |
|
var ampqAppName = $"altinn-app-{appIdentifier.Org}-{appIdentifier.App}"; |
|
|
|
return _env.IsProduction() |
|
? new EnvironmentConfiguration( |
|
ApiConfiguration.CreateProdConfiguration(), |
|
AmqpConfiguration.ProdHost, |
|
ampqAppName |
|
) |
|
: new EnvironmentConfiguration( |
|
ApiConfiguration.CreateTestConfiguration(), |
|
AmqpConfiguration.TestHost, |
|
ampqAppName |
|
); |
|
} |
However, this is pretty invisible to the user, and potentially a bit inflexible.
Suggestion
Either expose an environment switch (test/prod) or expose the AMQP and API host values directly. Currently automagically provided by AmqpConfiguration.ProdHost and ApiConfiguration.CreateProdConfiguration() (and their test equivalents).
Description
The Fiks IO client currently uses
IHostEnvironmentto decide which Fiks host to use:app-lib-dotnet/src/Altinn.App.Clients.Fiks/FiksIO/FiksIOClient.cs
Lines 233 to 248 in 103aeb0
However, this is pretty invisible to the user, and potentially a bit inflexible.
Suggestion
Either expose an environment switch (test/prod) or expose the AMQP and API host values directly. Currently automagically provided by
AmqpConfiguration.ProdHostandApiConfiguration.CreateProdConfiguration()(and theirtestequivalents).