Dloizides.Http.Resilience
0.1.0
dotnet add package Dloizides.Http.Resilience --version 0.1.0
NuGet\Install-Package Dloizides.Http.Resilience -Version 0.1.0
<PackageReference Include="Dloizides.Http.Resilience" Version="0.1.0" />
<PackageVersion Include="Dloizides.Http.Resilience" Version="0.1.0" />
<PackageReference Include="Dloizides.Http.Resilience" />
paket add Dloizides.Http.Resilience --version 0.1.0
#r "nuget: Dloizides.Http.Resilience, 0.1.0"
#:package Dloizides.Http.Resilience@0.1.0
#addin nuget:?package=Dloizides.Http.Resilience&version=0.1.0
#tool nuget:?package=Dloizides.Http.Resilience&version=0.1.0
Dloizides.Http.Resilience
House HttpClient defaults, built on Microsoft.Extensions.Http.Resilience (no own Polly pipeline).
builder.Services.AddHttpResilienceDefaults();
builder.Services.AddHttpClient("avatar-fetch").BlockPrivateAddresses();
AddHttpResilienceDefaultsadds the standard resilience handler to every HttpClient: total and per-attempt timeout, retry, circuit breaker. Retries are disabled for unsafe methods (POST, PATCH, PUT, DELETE, CONNECT), and a service's ownconfigurecannot turn them back on. The breaker is kept per authority (scheme, host, port), so failures at one host never open it for another; a blocked address is neither retried nor counted by the breaker.BlockPrivateAddressesis for a named client that calls a user-supplied URL (SSRF, OWASP API7). Every connection, including each redirect hop, resolves the host and refuses it withBlockedOutboundAddressExceptionunless every address is public: IPv4 outside every IANA special-purpose block, IPv6 only in global unicast 2000::/3 minus 2001::/23, 2001:db8::/32 and 3fff::/20. IPv4-mapped, NAT64 (64:ff9b::/96, 64:ff9b:1::/48) and 6to4 (2002::/16) addresses are unwrapped and checked as IPv4. The proxy is off for this client so the check sees the real target. The guard is applied last, after every other handler setup: a laterConfigurePrimaryHttpMessageHandlerwith aSocketsHttpHandlerstays guarded, and any other primary handler throwsInvalidOperationExceptionwhen the client is created. HTTP/3 (QUIC) bypasses the connect check, so this client is capped at HTTP/2: a 3.0 request is downgraded, and a 3.0 request withRequestVersionExactthrowsBlockedOutboundAddressException.
Reliability defaults and security floor row 11 of Dloizides.ServiceDefaults 2.0 (SVCDEF-1.2).
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Http.Resilience (>= 10.10.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Dloizides.Http.Resilience:
| Package | Downloads |
|---|---|
|
Dloizides.ServiceDefaults
Aspire-style service defaults for ASP.NET Core: OpenTelemetry (logging/metrics/tracing) wiring, HTTP resilience + service discovery, standard health-check registration (via ServiceDefaults.HealthChecks), and the platform endpoint map (anonymous /health/live|start|ready Kubernetes probes plus an ACME HTTP-01 no-op). Extracted from ~8 services that had each hand-copied the ServiceDefaults/Extensions.cs; normalizes the PostgressConnection connection-string typo by resolving both the correct (PostgresConnection) and legacy-typo keys. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 147 | 11/21/2026 |