Gateway in Aspire

This commit is contained in:
2025-09-15 01:14:43 +08:00
parent 091097a858
commit c1016e496a
9 changed files with 43 additions and 60 deletions

View File

@@ -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;
}