ResponseTransformExtensions Methods
Class Methods 8 members
Extensions for adding response header and trailer transforms.
WithTransformCopyResponseHeaders(YarpRoute, bool) Section titled WithTransformCopyResponseHeaders(YarpRoute, bool) extension YarpRoute 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
route YarpRoute copy bool optional WithTransformCopyResponseTrailers(YarpRoute, bool) Section titled WithTransformCopyResponseTrailers(YarpRoute, bool) extension YarpRoute 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
route YarpRoute copy bool optional WithTransformResponseHeader(YarpRoute, string, string, bool, ResponseCondition) Section titled WithTransformResponseHeader(YarpRoute, string, string, bool, ResponseCondition) extension YarpRoute 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
route YarpRoute headerName string value string append bool optional condition ResponseCondition optional WithTransformResponseHeaderRemove(YarpRoute, string, ResponseCondition) Section titled WithTransformResponseHeaderRemove(YarpRoute, string, ResponseCondition) extension YarpRoute 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[]) extension YarpRoute 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
route YarpRoute allowedHeaders string[] WithTransformResponseTrailer(YarpRoute, string, string, bool, ResponseCondition) Section titled WithTransformResponseTrailer(YarpRoute, string, string, bool, ResponseCondition) extension YarpRoute 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
route YarpRoute headerName string value string append bool optional condition ResponseCondition optional WithTransformResponseTrailerRemove(YarpRoute, string, ResponseCondition) Section titled WithTransformResponseTrailerRemove(YarpRoute, string, ResponseCondition) extension YarpRoute 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[]) extension YarpRoute 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
route YarpRoute allowedHeaders string[]