✨ Gateway in Aspire
This commit is contained in:
@@ -3,7 +3,6 @@ using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.ServiceDiscovery;
|
||||
using OpenTelemetry;
|
||||
using OpenTelemetry.Metrics;
|
||||
using OpenTelemetry.Trace;
|
||||
@@ -36,13 +35,16 @@ public static class Extensions
|
||||
});
|
||||
|
||||
// Uncomment the following to restrict the allowed schemes for service discovery.
|
||||
builder.Services.Configure<ServiceDiscoveryOptions>(options =>
|
||||
{
|
||||
options.AllowedSchemes = ["https"];
|
||||
});
|
||||
// builder.Services.Configure<ServiceDiscoveryOptions>(options =>
|
||||
// {
|
||||
// options.AllowedSchemes = ["https"];
|
||||
// });
|
||||
|
||||
builder.AddNatsClient("queue");
|
||||
builder.AddRedisClient("cache");
|
||||
builder.AddRedisClient("cache", configureOptions: opts =>
|
||||
{
|
||||
opts.AbortOnConnectFail = false;
|
||||
});
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
Reference in New Issue
Block a user