# ProxyOptions

<!-- https://uncage.vercel.app/docs/api/server/proxy/interfaces/proxyoptions/ -->

Defined in: proxy.ts:21

## Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| <a id="property-allowedhosts"></a> `allowedHosts?` | `string`[] | Hostnames the proxy answers to, matched against the request's `Host` header (port stripped; `X-Forwarded-Host` is ignored). A non-empty list REPLACES the default (add the loopback names yourself if you still need them). Entries are bare hostnames with no scheme or port; IPv6 literals are bracketed (`[::1]`). Entries are trimmed and lowercased, and empty ones dropped. Defaults to env `UNCAGE_ALLOWED_HOSTS` (comma-separated, same rules), else loopback only: `localhost`, `127.0.0.1`, `[::1]` (any port). | proxy.ts:36 |
| <a id="property-basepath"></a> `basePath?` | `string` | The route prefix the handler is mounted under. Defaults to `/api/uncage`. | proxy.ts:27 |
| <a id="property-endpoint"></a> `endpoint?` | `string` | Defaults to env `UNCAGE_URL`, else `http://127.0.0.1:4783`. | proxy.ts:23 |
| <a id="property-token"></a> `token?` | `string` | Defaults to env `UNCAGE_TOKEN`, else the contents of `~/.uncage/token` (read lazily). | proxy.ts:25 |
