Skip to content
Docs Try Aspire

RequestHeadersTransformExtensions

Class static net8.0
📦 Aspire.Hosting.Yarp v13.2.0
Extensions for adding request header transforms.
namespace Aspire.Hosting.Yarp.Transforms;
public static class RequestHeadersTransformExtensions
{
// ...
}
WithTransformCopyRequestHeaders(YarpRoute, bool)extensionats export
Adds the transform which will enable or suppress copying request headers to the proxy request.
WithTransformRequestHeader(YarpRoute, string, string, bool)extensionats export
Adds the transform which will append or set the request header.
WithTransformRequestHeaderRemove(YarpRoute, string)extensionats export
Adds the transform which will remove the request header.
WithTransformRequestHeaderRouteValue(YarpRoute, string, string, bool)extensionats export
Adds the transform which will append or set the request header from a route value.
WithTransformRequestHeadersAllowed(YarpRoute, string[])extensionats export
Adds the transform which will only copy the allowed request headers. Other transforms that modify or append to existing headers may be affected if not included in the allow list.
WithTransformUseOriginalHostHeader(YarpRoute, bool)extensionats export
Adds the transform which will copy the incoming request Host header to the proxy request.
View all methods