When you add builder.AddServiceDefaults();
to your applications which implemented on ServiceDefaults
project , its adds this code builder.Services.AddServiceDiscovery()
.
Service discovery read your urls from "Services" section on the application settings
So use this:
builder.Configuration.GetSection("Services").GetChildren();