···83838484Configure labeler subscriptions for content labeling. See [Labelers](../guides/features/labelers.md) for details.
85858686+### XRPC Proxy
8787+8888+Control which unrecognized XRPC methods are forwarded to their resolved authority. Choose from four modes: **Disabled** (block all proxy requests), **Open** (proxy everything — the default), **Allowlist** (only proxy NSIDs matching your patterns), or **Blocklist** (proxy everything except matching patterns). Allowlist and blocklist modes accept NSID patterns with trailing wildcards (e.g. `com.example.*`). Locally registered lexicons are always served regardless of this setting. See [XRPC Proxy](../reference/admin/xrpc-proxy.md) for the full API reference.
8989+8690### Environment Variables
87918892View the current values of all environment variables that affect HappyView's behavior. This is a read-only view — values are set via your deployment environment, not the dashboard.
+93
packages/docs/docs/reference/admin/xrpc-proxy.md
···11+# Admin API: XRPC Proxy
22+33+Control which unrecognized XRPC methods HappyView forwards to their resolved authority. Locally registered lexicons are always served regardless of this setting.
44+55+All endpoints require the `settings:manage` permission.
66+77+```sh
88+# All examples assume $TOKEN is an API key (hv_...)
99+AUTH="Authorization: Bearer $TOKEN"
1010+```
1111+1212+## Get proxy config
1313+1414+```
1515+GET /admin/settings/xrpc-proxy
1616+```
1717+1818+```sh
1919+curl http://127.0.0.1:3000/admin/settings/xrpc-proxy -H "$AUTH"
2020+```
2121+2222+**Response**: `200 OK`
2323+2424+```json
2525+{
2626+ "mode": "allowlist",
2727+ "nsids": ["com.example.feed.*", "games.gamesgamesgamesgames.*"]
2828+}
2929+```
3030+3131+Returns `{"mode": "open", "nsids": []}` when no config has been saved.
3232+3333+## Update proxy config
3434+3535+```
3636+PUT /admin/settings/xrpc-proxy
3737+```
3838+3939+```sh
4040+curl -X PUT http://127.0.0.1:3000/admin/settings/xrpc-proxy \
4141+ -H "$AUTH" \
4242+ -H "Content-Type: application/json" \
4343+ -d '{
4444+ "mode": "allowlist",
4545+ "nsids": ["com.example.feed.*"]
4646+ }'
4747+```
4848+4949+**Response**: `204 No Content`
5050+5151+Changes take effect immediately — no restart needed.
5252+5353+### Modes
5454+5555+| Mode | Behavior |
5656+|------|----------|
5757+| `disabled` | Block all proxy requests. Return `403` for every unrecognized NSID. |
5858+| `open` | Proxy everything (default). Current behavior on a fresh install. |
5959+| `allowlist` | Proxy only NSIDs matching a pattern in `nsids`. Return `403` for the rest. |
6060+| `blocklist` | Proxy everything except NSIDs matching a pattern in `nsids`. |
6161+6262+When mode is `disabled` or `open`, any `nsids` in the request body are ignored and stored as `[]`.
6363+6464+### NSID patterns
6565+6666+Patterns are dotted NSID identifiers. Trailing wildcards are supported:
6767+6868+- `com.example.feed.getHot` — exact match
6969+- `com.example.feed.*` — matches any NSID starting with `com.example.feed.`
7070+- `games.gamesgamesgamesgames.*` — matches the entire namespace
7171+7272+Mid-segment wildcards (e.g., `com.*.feed`) are not supported.
7373+7474+### Validation errors
7575+7676+| Status | Cause |
7777+|--------|-------|
7878+| `400` | An NSID pattern is empty, has fewer than two segments, contains invalid characters, or uses an unsupported wildcard |
7979+| `422` | `mode` is not one of `disabled`, `open`, `allowlist`, `blocklist` |
8080+8181+## Blocked request response
8282+8383+When the proxy denies a request, the client receives:
8484+8585+```
8686+403 Forbidden
8787+```
8888+8989+```json
9090+{
9191+ "error": "NSID not allowed by proxy policy"
9292+}
9393+```
+4
packages/docs/docs/reference/xrpc-api.md
···177177178178**Response** for both: proxied from the user's PDS.
179179180180+## XRPC proxy
181181+182182+When a request targets an NSID that has no locally registered lexicon, HappyView resolves the NSID's authority via DNS and forwards the request. Admins can restrict which NSIDs are proxied — see [XRPC Proxy settings](admin/xrpc-proxy.md).
183183+180184## Errors
181185182186All error responses return JSON with an `error` field: