# AddCatchAllRoute

- Module: [Aspire.Hosting.Yarp](/reference/api/go/aspire.hosting.yarp.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`YarpConfigurationBuilder`](/reference/api/go/aspire.hosting.yarp/yarpconfigurationbuilder.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

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

## Definition

```go
func (YarpConfigurationBuilder) 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()`.

## Applies to

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