# YarpRoute.withTransformResponseTrailersAllowed

- Module: [Aspire.Hosting.Yarp](/reference/api/typescript/aspire.hosting.yarp.md)
- Defined on: [YarpRoute](/reference/api/typescript/aspire.hosting.yarp/yarproute.md)
- Version: `13.4.0`
- Kind: `method`

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.

## Definition

```typescript
interface YarpRoute {
  // ... omitted for brevity
  withTransformResponseTrailersAllowed(allowedHeaders: string[]): YarpRoute;
}
```

## Signature

```typescript
withTransformResponseTrailersAllowed(allowedHeaders: string[]): YarpRoute
```

## Parameters

- `allowedHeaders` (`string[]`)

## Returns

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

## Defined on

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