# ResourceWithEndpoints.WithEndpointProxySupport

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

Set whether a resource can use proxied endpoints or whether they should be disabled for all endpoints belonging to the resource. If set to `false`, endpoints belonging to the resource will ignore the configured proxy settings and run proxy-less.

## Remarks

This method is intended to support scenarios with persistent lifetime resources where it is desirable for the resource to be accessible over the same
port whether the Aspire application is running or not. Proxied endpoints bind ports that are only accessible while the Aspire application is running.
The user needs to be careful to ensure that endpoints are using unique ports when disabling proxy support as by default for proxy-less
endpoints, Aspire will allocate the target port as the host port, which will increase the chance of port conflicts.

## Definition

```go
func (ResourceWithEndpoints) WithEndpointProxySupport(proxyEnabled bool) ResourceWithEndpoints
```

## Signature

```go
WithEndpointProxySupport(proxyEnabled bool) ResourceWithEndpoints
```

## Parameters

- `proxyEnabled` (`bool`) -- Should endpoints for the resource support using a proxy?

## Returns

[`ResourceWithEndpoints`](/reference/api/go/aspire.hosting/resourcewithendpoints.md) -- The resource builder.

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

## Defined on

A marker interface declares no methods of its own in Go. Its functions are declared on the concrete types they apply to.

- [ResourceWithEndpoints](/reference/api/go/aspire.hosting/resourcewithendpoints.md) -- `marker`

## Applies to

- [`CSharpAppResource`](/reference/api/go/aspire.hosting/csharpappresource.md)
- [`ContainerResource`](/reference/api/go/aspire.hosting/containerresource.md)
- [`DotnetToolResource`](/reference/api/go/aspire.hosting/dotnettoolresource.md)
- [`ExecutableResource`](/reference/api/go/aspire.hosting/executableresource.md)
- [`ProjectResource`](/reference/api/go/aspire.hosting/projectresource.md)
