# YarpConfigurationBuilder.AddCatchAllRoute

- Module: [Aspire.Hosting.Yarp](/reference/api/go/aspire.hosting.yarp.md)
- Defined on: [YarpConfigurationBuilder](/reference/api/go/aspire.hosting.yarp/yarpconfigurationbuilder.md)
- Version: `17.0.0`
- Kind: `method`

Adds a catch-all route for a cluster, endpoint, resource, or string destination target.

## Definition

```go
type YarpConfigurationBuilder interface {
    // ... omitted for brevity
    AddCatchAllRoute(target any) YarpRoute
}
```

## Signature

```go
AddCatchAllRoute(target any) YarpRoute
```

## Parameters

- `target` (`any`) -- The target cluster, endpoint, resource, or string destination for this route.

## Returns

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

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

## Defined on

- [YarpConfigurationBuilder](/reference/api/go/aspire.hosting.yarp/yarpconfigurationbuilder.md) -- `interface`
