ResponseTransformExtensions Methods
ClassMethods8 members
Extensions for adding response header and trailer transforms.
WithTransformCopyResponseHeaders(YarpRoute, bool) Section titled WithTransformCopyResponseHeaders(YarpRoute, bool)extensionYarp Adds the transform which will enable or suppress copying response headers to the client response.
public static class ResponseTransformExtensions{ public static YarpRoute WithTransformCopyResponseHeaders( this YarpRoute route, bool copy = true) { // ... }}Parameters
routeYarpcopybooloptionalWithTransformCopyResponseTrailers(YarpRoute, bool) Section titled WithTransformCopyResponseTrailers(YarpRoute, bool)extensionYarp Adds the transform which will enable or suppress copying response trailers to the client response.
public static class ResponseTransformExtensions{ public static YarpRoute WithTransformCopyResponseTrailers( this YarpRoute route, bool copy = true) { // ... }}Parameters
routeYarpcopybooloptionalWithTransformResponseHeader(YarpRoute, string, string, bool, ResponseCondition) Section titled WithTransformResponseHeader(YarpRoute, string, string, bool, ResponseCondition)extensionYarp Adds the transform which will append or set the response header.
public static class ResponseTransformExtensions{ public static YarpRoute WithTransformResponseHeader( this YarpRoute route, string headerName, string value, bool append = true, ResponseCondition condition = ResponseCondition.Success) { // ... }}Parameters
WithTransformResponseHeaderRemove(YarpRoute, string, ResponseCondition) Section titled WithTransformResponseHeaderRemove(YarpRoute, string, ResponseCondition)extensionYarp Adds the transform which will remove the response header.
public static class ResponseTransformExtensions{ public static YarpRoute WithTransformResponseHeaderRemove( this YarpRoute route, string headerName, ResponseCondition condition = ResponseCondition.Success) { // ... }}Parameters
WithTransformResponseHeadersAllowed(YarpRoute, string[]) Section titled WithTransformResponseHeadersAllowed(YarpRoute, string[])extensionYarp Adds the transform which will only copy the allowed response headers. Other transforms that modify or append to existing headers may be affected if not included in the allow list.
public static class ResponseTransformExtensions{ public static YarpRoute WithTransformResponseHeadersAllowed( this YarpRoute route, params string[] allowedHeaders) { // ... }}Parameters
routeYarpallowedHeaders string[]WithTransformResponseTrailer(YarpRoute, string, string, bool, ResponseCondition) Section titled WithTransformResponseTrailer(YarpRoute, string, string, bool, ResponseCondition)extensionYarp Adds the transform which will append or set the response trailer.
public static class ResponseTransformExtensions{ public static YarpRoute WithTransformResponseTrailer( this YarpRoute route, string headerName, string value, bool append = true, ResponseCondition condition = ResponseCondition.Success) { // ... }}Parameters
WithTransformResponseTrailerRemove(YarpRoute, string, ResponseCondition) Section titled WithTransformResponseTrailerRemove(YarpRoute, string, ResponseCondition)extensionYarp Adds the transform which will remove the response trailer.
public static class ResponseTransformExtensions{ public static YarpRoute WithTransformResponseTrailerRemove( this YarpRoute route, string headerName, ResponseCondition condition = ResponseCondition.Success) { // ... }}Parameters
WithTransformResponseTrailersAllowed(YarpRoute, string[]) Section titled WithTransformResponseTrailersAllowed(YarpRoute, string[])extensionYarp Adds the transform which will only copy the allowed response trailers. Other transforms that modify or append to existing trailers may be affected if not included in the allow list.
public static class ResponseTransformExtensions{ public static YarpRoute WithTransformResponseTrailersAllowed( this YarpRoute route, params string[] allowedHeaders) { // ... }}Parameters
routeYarpallowedHeaders string[]