# withTransformResponseHeadersAllowed

- 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 only copy the allowed response headers. Other transforms that modify or append to existing headers may be affected if not included in the allow list.

## Definition

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

## Parameters

- `allowedHeaders` (`string[]`)

## Returns

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

## Applies to

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