github dotnet/yarp v2.3.0
2.3.0

one day ago

This release supports .NET 8.0 and newer. See Getting Started.
Note that while this version also includes targets for .NET 6 and .NET 7, those runtimes are no longer supported.

The Yarp.ReverseProxy packages are available on NuGet.org.

Breaking changes

  • More errors triggered by the client disconnecting are now logged under a Debug severity (#2765 by @MihaZupan).
    • ForwarderError.ResponseBodyCanceled and UpgradeResponseCanceled are no longer logged with a Warning severity.
    • This is a continuation of a change we've made in 2.2 where we've done the same with RequestCanceled, RequestBodyCanceled, and UpgradeRequestCanceled.
  • Replacing the HttpRequestMessage.Content property in a request transform will throw an exception (#2722 by @MihaZupan).
    • While setting the property may have appeared to work during limited testing, it could lead to various issues as YARP internally relies on the property remaining unchanged. See the pull request for more context on this change.
  • We now always enforce the HttpVersionPolicy during HTTP version negotiation (#2729 by @MihaZupan).
    • It was previously possible for YARP to initiate HTTP/1.1 connections for WebSocket and SPDY requests even if the specified HttpVersionPolicy disallowed it. This was breaking scenarios such as outgoing HTTP/2 WebSockets without TLS.
    • If the policy disallows the use of outbound HTTP/1.1, SPDY requests will not be proxied and will instead return a RequestCreation error.
    • This does not affect the default YARP configuration, which is Version=2.0, Policy=RequestVersionOrLower.

Major changes

  • YARP has always logically been a part of .NET and we have now moved the repository from the microsoft to the dotnet organization.
  • We've created a JSON schema for YARP configuration! Editing now comes with validation and autocompletions (#2758 by @MihaZupan).
    • The change is automatic when referencing the 2.3.0 version of the YARP package and editing the ReverseProxy section in appsettings.json.
      image
      image
    • If you encounter any issues with the schema, please let us know by opening an issue.
    • False positives can be safely ignored until we're able to update the schema. Runtime interpretation of the configuration remains unchanged and is unaffected by schema validation.
    • You can manually reference the latest version of the schema without changing the package by pointing Visual Studio at https://raw.githubusercontent.com/dotnet/yarp/refs/heads/main/src/ReverseProxy/ConfigurationSchema.json.
      image
  • We've started shipping a minimal YARP container image at mcr.microsoft.com (#2710 by @benjaminpetit).
    • More functionality will be added to the image over time.

Other changes

  • We've added optional parameters to AddForwarded and AddXForwarded request transforms that allow you to opt-out of removing the other variant of the header (#2728 by @rkargMsft).
    ctx.AddForwarded(removeAllXForwardedHeaders: false);
    ctx.AddXForwarded(removeForwardedHeader: false);
  • Improved HttpSysDelegator logging and retry logic (#2671 by @NGloreous).
  • YARP can now be published with NativeAOT when targetting .NET 8.0 again (#2759 by @MihaZupan).
  • We've added a workaround for an error in .NET builds from the Ubuntu package feed (#2673 by @MihaZupan).

New Contributors

For a full list of changes see here.

Don't miss a new yarp release

NewReleases is sending notifications on new releases.