# WithTransformPathRemovePrefix

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

Adds the transform which will remove the matching prefix from the request path.

## Definition

```go
func (YarpRoute) WithTransformPathRemovePrefix(prefix string) YarpRoute
```

## Parameters

- `prefix` (`string`) -- The matching prefix to remove.

## Returns

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

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

## Applies to

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