YarpRoute
Handle
interface YarpRoute { withMatch(match: YarpRouteMatch): YarpRoute; withMatchHeaders(headers: YarpRouteHeaderMatch[]): YarpRoute; withMatchHosts(hosts: string[]): YarpRoute; withMatchMethods(methods: string[]): YarpRoute; withMatchPath(path: string): YarpRoute; withMatchRouteQueryParameter(queryParameters: YarpRouteQueryParameterMatch[]): YarpRoute; withMaxRequestBodySize(maxRequestBodySize: number): YarpRoute; withMetadata(metadata: Dict<string,string>): YarpRoute; withOrder(order: number): YarpRoute; withTransform(transform: Dict<string,string>): YarpRoute; withTransformClientCertHeader(headerName: string): YarpRoute; withTransformCopyRequestHeaders(copy?: boolean): YarpRoute; withTransformCopyResponseHeaders(copy?: boolean): YarpRoute; withTransformCopyResponseTrailers(copy?: boolean): YarpRoute; withTransformForwarded( useHost?: boolean, useProto?: boolean, forFormat?: NodeFormat, byFormat?: NodeFormat, action?: ForwardedTransformActions): YarpRoute; withTransformHttpMethodChange( fromHttpMethod: string, toHttpMethod: string): YarpRoute; withTransformPathPrefix(prefix: string): YarpRoute; withTransformPathRemovePrefix(prefix: string): YarpRoute; withTransformPathRouteValues(pattern: string): YarpRoute; withTransformPathSet(path: string): YarpRoute; withTransformQueryRemoveKey(queryKey: string): YarpRoute; withTransformQueryRouteValue( queryKey: string, routeValueKey: string, append?: boolean): YarpRoute; withTransformQueryValue( queryKey: string, value: string, append?: boolean): YarpRoute; withTransformRequestHeader( headerName: string, value: string, append?: boolean): YarpRoute; withTransformRequestHeaderRemove(headerName: string): YarpRoute; withTransformRequestHeaderRouteValue( headerName: string, routeValueKey: string, append?: boolean): YarpRoute; withTransformRequestHeadersAllowed(allowedHeaders: string[]): YarpRoute; withTransformResponseHeader( headerName: string, value: string, append?: boolean, condition?: ResponseCondition): YarpRoute; withTransformResponseHeaderRemove( headerName: string, condition?: ResponseCondition): YarpRoute; withTransformResponseHeadersAllowed(allowedHeaders: string[]): YarpRoute; withTransformResponseTrailer( headerName: string, value: string, append?: boolean, condition?: ResponseCondition): YarpRoute; withTransformResponseTrailerRemove( headerName: string, condition?: ResponseCondition): YarpRoute; withTransformResponseTrailersAllowed(allowedHeaders: string[]): YarpRoute; withTransforms(transforms: Dict<string,string>[]): YarpRoute; withTransformUseOriginalHostHeader(useOriginal?: boolean): YarpRoute; withTransformXForwarded( headerPrefix?: string, xDefault?: ForwardedTransformActions, xFor?: ForwardedTransformActions, xHost?: ForwardedTransformActions, xProto?: ForwardedTransformActions, xPrefix?: ForwardedTransformActions): YarpRoute;} 36 members
Methods
method
withMatch Sets the route match criteria.
withMatch(match: YarpRouteMatch): YarpRouteParameters
match YarpRouteMatch Returns
YarpRoute method
withMatchHeaders Matches requests that contain the specified headers.
withMatchHeaders(headers: YarpRouteHeaderMatch[]): YarpRouteParameters
headers YarpRouteHeaderMatch[] Returns
YarpRoute method
withMatchHosts Matches requests that contain the specified host headers.
withMatchHosts(hosts: string[]): YarpRouteParameters
hosts string[] Returns
YarpRoute method
withMatchMethods Matches requests that use the specified HTTP methods.
withMatchMethods(methods: string[]): YarpRouteParameters
methods string[] Returns
YarpRoute method
withMatchPath Matches requests with the specified path pattern.
withMatchPath(path: string): YarpRouteParameters
path string Returns
YarpRoute method
withMatchRouteQueryParameter Matches requests that contain the specified query parameters.
withMatchRouteQueryParameter(queryParameters: YarpRouteQueryParameterMatch[]): YarpRouteParameters
queryParameters YarpRouteQueryParameterMatch[] Returns
YarpRoute method
withMaxRequestBodySize Sets the maximum request body size for the route.
withMaxRequestBodySize(maxRequestBodySize: number): YarpRouteParameters
maxRequestBodySize number Returns
YarpRoute method
withMetadata Sets metadata for the route.
withMetadata(metadata: Dict<string,string>): YarpRouteParameters
metadata Dict<string,string> Returns
YarpRoute method
withOrder Sets the route order.
withOrder(order: number): YarpRouteParameters
order number Returns
YarpRoute method
withTransform Adds a transform to the route.
withTransform(transform: Dict<string,string>): YarpRouteParameters
transform Dict<string,string> Returns
YarpRoute Adds the transform which will set the given header with the Base64 encoded client certificate.
withTransformClientCertHeader(headerName: string): YarpRouteParameters
headerName string Returns
YarpRoute Adds the transform which will enable or suppress copying request headers to the proxy request.
withTransformCopyRequestHeaders(copy?: boolean): YarpRouteParameters
copy boolean optional = True Returns
YarpRoute Adds the transform which will enable or suppress copying response headers to the client response.
withTransformCopyResponseHeaders(copy?: boolean): YarpRouteParameters
copy boolean optional = True Returns
YarpRoute Adds the transform which will enable or suppress copying response trailers to the client response.
withTransformCopyResponseTrailers(copy?: boolean): YarpRouteParameters
copy boolean optional = True Returns
YarpRoute method
withTransformForwarded Adds the transform which will add the Forwarded header as defined by [RFC 7239](https://tools.ietf.org/html/rfc7239).
withTransformForwarded( useHost?: boolean, useProto?: boolean, forFormat?: NodeFormat, byFormat?: NodeFormat, action?: ForwardedTransformActions): YarpRouteParameters
useHost boolean optional = True useProto boolean optional = True forFormat NodeFormat optional = Random byFormat NodeFormat optional = Random action ForwardedTransformActions optional = Set Returns
YarpRoute Adds the transform that will replace the HTTP method if it matches.
withTransformHttpMethodChange( fromHttpMethod: string, toHttpMethod: string): YarpRouteParameters
fromHttpMethod string toHttpMethod string Returns
YarpRoute method
withTransformPathPrefix Adds the transform which will prefix the request path with the given value.
withTransformPathPrefix(prefix: string): YarpRouteParameters
prefix string Returns
YarpRoute Adds the transform which will remove the matching prefix from the request path.
withTransformPathRemovePrefix(prefix: string): YarpRouteParameters
prefix string Returns
YarpRoute method
withTransformPathRouteValues Adds the transform which will set the request path with route values.
withTransformPathRouteValues(pattern: string): YarpRouteParameters
pattern string Returns
YarpRoute method
withTransformPathSet Adds the transform which sets the request path with the given value.
withTransformPathSet(path: string): YarpRouteParameters
path string Returns
YarpRoute method
withTransformQueryRemoveKey Adds the transform that will remove the given query key.
withTransformQueryRemoveKey(queryKey: string): YarpRouteParameters
queryKey string Returns
YarpRoute method
withTransformQueryRouteValue Adds the transform that will append or set the query parameter from a route value.
withTransformQueryRouteValue( queryKey: string, routeValueKey: string, append?: boolean): YarpRouteParameters
queryKey string routeValueKey string append boolean optional = True Returns
YarpRoute method
withTransformQueryValue Adds the transform that will append or set the query parameter from the given value.
withTransformQueryValue( queryKey: string, value: string, append?: boolean): YarpRouteParameters
queryKey string value string append boolean optional = True Returns
YarpRoute method
withTransformRequestHeader Adds the transform which will append or set the request header.
withTransformRequestHeader( headerName: string, value: string, append?: boolean): YarpRouteParameters
headerName string value string append boolean optional = True Returns
YarpRoute Adds the transform which will remove the request header.
withTransformRequestHeaderRemove(headerName: string): YarpRouteParameters
headerName string Returns
YarpRoute Adds the transform which will append or set the request header from a route value.
withTransformRequestHeaderRouteValue( headerName: string, routeValueKey: string, append?: boolean): YarpRouteParameters
headerName string routeValueKey string append boolean optional = True Returns
YarpRoute Adds the transform which will only copy the allowed request headers. Other transforms
withTransformRequestHeadersAllowed(allowedHeaders: string[]): YarpRouteParameters
allowedHeaders string[] Returns
YarpRoute method
withTransformResponseHeader Adds the transform which will append or set the response header.
withTransformResponseHeader( headerName: string, value: string, append?: boolean, condition?: ResponseCondition): YarpRouteParameters
headerName string value string append boolean optional = True condition ResponseCondition optional = Success Returns
YarpRoute Adds the transform which will remove the response header.
withTransformResponseHeaderRemove( headerName: string, condition?: ResponseCondition): YarpRouteParameters
headerName string condition ResponseCondition optional = Success Returns
YarpRoute Adds the transform which will only copy the allowed response headers. Other transforms
withTransformResponseHeadersAllowed(allowedHeaders: string[]): YarpRouteParameters
allowedHeaders string[] Returns
YarpRoute method
withTransformResponseTrailer Adds the transform which will append or set the response trailer.
withTransformResponseTrailer( headerName: string, value: string, append?: boolean, condition?: ResponseCondition): YarpRouteParameters
headerName string value string append boolean optional = True condition ResponseCondition optional = Success Returns
YarpRoute Adds the transform which will remove the response trailer.
withTransformResponseTrailerRemove( headerName: string, condition?: ResponseCondition): YarpRouteParameters
headerName string condition ResponseCondition optional = Success Returns
YarpRoute Adds the transform which will only copy the allowed response trailers. Other transforms
withTransformResponseTrailersAllowed(allowedHeaders: string[]): YarpRouteParameters
allowedHeaders string[] Returns
YarpRoute method
withTransforms Sets the transforms for the route.
withTransforms(transforms: Dict<string,string>[]): YarpRouteParameters
transforms Dict<string,string>[] Returns
YarpRoute Adds the transform which will copy the incoming request Host header to the proxy request.
withTransformUseOriginalHostHeader(useOriginal?: boolean): YarpRouteParameters
useOriginal boolean optional = True Returns
YarpRoute method
withTransformXForwarded Adds the transform which will add X-Forwarded-* headers.
withTransformXForwarded( headerPrefix?: string, xDefault?: ForwardedTransformActions, xFor?: ForwardedTransformActions, xHost?: ForwardedTransformActions, xProto?: ForwardedTransformActions, xPrefix?: ForwardedTransformActions): YarpRouteParameters
headerPrefix string optional = X-Forwarded- xDefault ForwardedTransformActions optional = Set xFor ForwardedTransformActions optional xHost ForwardedTransformActions optional xProto ForwardedTransformActions optional xPrefix ForwardedTransformActions optional Returns
YarpRoute