---
title: "Tls Allow"
method: GET
path: "/internal/tls-allow"
tags: ["custom-domains"]
---

# Tls Allow

`GET /internal/tls-allow`

## Request

- Base URL: `https://api.agent4.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.agent4.io/internal/tls-allow`
- Auth: none declared

Caddy on_demand_tls 的 `ask`：200 = 给这个域名签证书，404 = 拒绝握手。

没有它，任何人把域名解析过来我们就免费替他签证书并托管 —— 等于给陌生人跑 CDN。

**只服务 Caddy 自己的进程内请求**。Caddy 与 app 同机（host network），它的 ask 子请求
直连 127.0.0.1 且**不带** X-Forwarded-For；被它反代进来的公网请求同样来自 127.0.0.1，
但一定带 X-Forwarded-For —— 这个头的有无就是内外的分界线。光看来源 IP 分不出这两者。

## Query parameters

- `domain` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/agent4/apis/chatagent-platform.md) · [All operations](https://skmtc.dev/agent4/apis/chatagent-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/agent4/apis/chatagent-platform/revisions/18e58f082ce3?raw)
