👔 Remove the activity timeout control, make client send heartbeat instead

This commit is contained in:
2025-07-29 17:06:19 +08:00
parent 83059374e9
commit 4246fea03f
2 changed files with 2 additions and 9 deletions

View File

@@ -91,10 +91,6 @@ public class RegistryProxyConfigProvider : IProxyConfigProvider, IDisposable
{
{ "destination1", new DestinationConfig { Address = serviceUrl } }
},
HttpRequest = new ForwarderRequestConfig
{
ActivityTimeout = directRoute.IsWebSocket ? TimeSpan.FromHours(24) : TimeSpan.FromMinutes(2)
}
};
clusters.Add(cluster);
}
@@ -104,7 +100,6 @@ public class RegistryProxyConfigProvider : IProxyConfigProvider, IDisposable
RouteId = $"direct-{directRoute.Service}-{directRoute.Path.Replace("/", "-")}",
ClusterId = directRoute.Service,
Match = new RouteMatch { Path = directRoute.Path },
Timeout = directRoute.IsWebSocket ? null : TimeSpan.FromSeconds(5),
};
routes.Add(route);
_logger.LogInformation(" Added Direct Route: {Path} -> {Service}", directRoute.Path,
@@ -232,7 +227,6 @@ public class RegistryProxyConfigProvider : IProxyConfigProvider, IDisposable
{
public required string Path { get; set; }
public required string Service { get; set; }
public bool IsWebSocket { get; set; } = false;
}
public virtual void Dispose()
@@ -242,4 +236,4 @@ public class RegistryProxyConfigProvider : IProxyConfigProvider, IDisposable
_watchCts.Cancel();
_watchCts.Dispose();
}
}
}

View File

@@ -18,7 +18,6 @@ public static class ServiceCollectionExtensions
var caCert = X509CertificateLoader.LoadCertificateFromFile(configuration["CaCert"]!);
handler.SslOptions = new SslClientAuthenticationOptions
{
// TODO: check the ca in the future, for now just trust it, i need sleep
RemoteCertificateValidationCallback = (sender, cert, chain, errors) => true
};
});
@@ -28,4 +27,4 @@ public static class ServiceCollectionExtensions
return services;
}
}
}