diff --git a/DysonNetwork.Gateway/Startup/ServiceCollectionExtensions.cs b/DysonNetwork.Gateway/Startup/ServiceCollectionExtensions.cs
index d147b14..53cef77 100644
--- a/DysonNetwork.Gateway/Startup/ServiceCollectionExtensions.cs
+++ b/DysonNetwork.Gateway/Startup/ServiceCollectionExtensions.cs
@@ -2,6 +2,7 @@ using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using DysonNetwork.Shared.Registry;
using Yarp.ReverseProxy.Configuration;
+using Yarp.ReverseProxy.Transforms;
namespace DysonNetwork.Gateway.Startup;
@@ -15,11 +16,15 @@ public static class ServiceCollectionExtensions
.AddReverseProxy()
.ConfigureHttpClient((context, handler) =>
{
- var caCert = X509CertificateLoader.LoadCertificateFromFile(configuration["CaCert"]!);
+ // var caCert = X509CertificateLoader.LoadCertificateFromFile(configuration["CaCert"]!);
handler.SslOptions = new SslClientAuthenticationOptions
{
RemoteCertificateValidationCallback = (sender, cert, chain, errors) => true
};
+ })
+ .AddTransforms(context =>
+ {
+ context.AddForwarded();
});
services.AddRegistryService(configuration, addForwarder: false);
diff --git a/DysonNetwork.sln.DotSettings.user b/DysonNetwork.sln.DotSettings.user
index 2eace75..e5c3a1b 100644
--- a/DysonNetwork.sln.DotSettings.user
+++ b/DysonNetwork.sln.DotSettings.user
@@ -57,6 +57,7 @@
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
@@ -120,6 +121,7 @@
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded