Class ForwardedTransformExtensions
Extensions for adding forwarded header transforms.
Inheritance
System.Object
ForwardedTransformExtensions
Assembly: Yarp.ReverseProxy.dll
public static class ForwardedTransformExtensions : object
Methods
|
Improve this Doc
View Source
Adds the transform which will set the given header with the Base64 encoded client certificate.
Declaration
public static TransformBuilderContext AddClientCertHeader(this TransformBuilderContext context, string headerName)
Parameters
Returns
|
Improve this Doc
View Source
AddForwarded(TransformBuilderContext, Boolean, Boolean, NodeFormat, NodeFormat, ForwardedTransformActions)
Adds the transform which will add the Forwarded header as defined by RFC 7239.
Declaration
public static TransformBuilderContext AddForwarded(this TransformBuilderContext context, bool useHost = true, bool useProto = true, NodeFormat forFormat = NodeFormat.Random, NodeFormat byFormat = NodeFormat.Random, ForwardedTransformActions action = default(ForwardedTransformActions))
Parameters
Returns
|
Improve this Doc
View Source
AddXForwarded(TransformBuilderContext, ForwardedTransformActions)
Adds the transform which will add X-Forwarded-* request headers.
Declaration
public static TransformBuilderContext AddXForwarded(this TransformBuilderContext context, ForwardedTransformActions action = default(ForwardedTransformActions))
Parameters
Returns
|
Improve this Doc
View Source
AddXForwardedFor(TransformBuilderContext, String, ForwardedTransformActions)
Adds the transform which will add X-Forwarded-For request header.
Declaration
public static TransformBuilderContext AddXForwardedFor(this TransformBuilderContext context, string headerName = "X-Forwarded-For", ForwardedTransformActions action = default(ForwardedTransformActions))
Parameters
Returns
|
Improve this Doc
View Source
AddXForwardedHost(TransformBuilderContext, String, ForwardedTransformActions)
Adds the transform which will add X-Forwarded-Host request header.
Declaration
public static TransformBuilderContext AddXForwardedHost(this TransformBuilderContext context, string headerName = "X-Forwarded-Host", ForwardedTransformActions action = default(ForwardedTransformActions))
Parameters
Returns
|
Improve this Doc
View Source
AddXForwardedPrefix(TransformBuilderContext, String, ForwardedTransformActions)
Adds the transform which will add X-Forwarded-Prefix request header.
Declaration
public static TransformBuilderContext AddXForwardedPrefix(this TransformBuilderContext context, string headerName = "X-Forwarded-Prefix", ForwardedTransformActions action = default(ForwardedTransformActions))
Parameters
Returns
|
Improve this Doc
View Source
AddXForwardedProto(TransformBuilderContext, String, ForwardedTransformActions)
Adds the transform which will add X-Forwarded-Proto request header.
Declaration
public static TransformBuilderContext AddXForwardedProto(this TransformBuilderContext context, string headerName = "X-Forwarded-Proto", ForwardedTransformActions action = default(ForwardedTransformActions))
Parameters
Returns
|
Improve this Doc
View Source
Clones the route and adds the transform which will set the given header with the Base64 encoded client certificate.
Declaration
public static RouteConfig WithTransformClientCertHeader(this RouteConfig route, string headerName)
Parameters
Type |
Name |
Description |
RouteConfig |
route |
|
System.String |
headerName |
|
Returns
|
Improve this Doc
View Source
Clones the route and adds the transform which will add the Forwarded header as defined by RFC 7239.
Declaration
public static RouteConfig WithTransformForwarded(this RouteConfig route, bool useHost = true, bool useProto = true, NodeFormat forFormat = NodeFormat.Random, NodeFormat byFormat = NodeFormat.Random, ForwardedTransformActions action = default(ForwardedTransformActions))
Parameters
Returns
|
Improve this Doc
View Source
Clones the route and adds the transform which will add X-Forwarded-* headers.
Declaration
public static RouteConfig WithTransformXForwarded(this RouteConfig route, string headerPrefix = "X-Forwarded-", ForwardedTransformActions xDefault = default(ForwardedTransformActions), ForwardedTransformActions? xFor = null, ForwardedTransformActions? xHost = null, ForwardedTransformActions? xProto = null, ForwardedTransformActions? xPrefix = null)
Parameters
Returns