# YarpRoute.withMatchHeaders

- 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`

Only match requests that contain all of these headers.

## Definition

```typescript
interface YarpRoute {
  // ... omitted for brevity
  withMatchHeaders(headers: YarpRouteHeaderMatch[]): YarpRoute;
}
```

## Signature

```typescript
withMatchHeaders(headers: YarpRouteHeaderMatch[]): YarpRoute
```

## Parameters

- `headers` (`YarpRouteHeaderMatch[]`)

## Returns

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

## Defined on

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