# withTransformForwarded

- Module: [Aspire.Hosting.Yarp](/reference/api/typescript/aspire.hosting.yarp.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

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

## Definition

```typescript
interface YarpRoute {
  // ... omitted for brevity
  withTransformForwarded(
    useHost?: boolean,
    useProto?: boolean,
    forFormat?: NodeFormat,
    byFormat?: NodeFormat,
    action?: ForwardedTransformActions): YarpRoute
}
```

## Parameters

- `useHost` (`boolean`) `optional` `= True`
- `useProto` (`boolean`) `optional` `= True`
- `forFormat` (`NodeFormat`) `optional` `= Random`
- `byFormat` (`NodeFormat`) `optional` `= Random`
- `action` (`ForwardedTransformActions`) `optional` `= Set`

## Returns

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

## Applies to

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