# WithTransformForwarded

- Module: [Aspire.Hosting.Yarp](/reference/api/go/aspire.hosting.yarp.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`YarpRoute`](/reference/api/go/aspire.hosting.yarp/yarproute.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Adds the transform which will add the Forwarded header as defined by [RFC 7239](https://tools.ietf.org/html/rfc7239).

## Definition

```go
func (YarpRoute) WithTransformForwarded(options ...*WithTransformForwardedOptions) YarpRoute
```

## Parameters

- `options` (`...*WithTransformForwardedOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithTransformForwardedOptions` argument.

- `UseHost` (`*bool`)
- `UseProto` (`*bool`)
- `ForFormat` (`*NodeFormat`)
- `ByFormat` (`*NodeFormat`)
- `Action` (`*ForwardedTransformActions`)

## Returns

[`YarpRoute`](/reference/api/go/aspire.hosting.yarp/yarproute.md)

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`YarpRoute`](/reference/api/go/aspire.hosting.yarp/yarproute.md)
