> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-docs-automation-github-pr-review.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 在 Vercel 前使用外部代理

> 在你的 Vercel 部署前配置 Cloudflare 或 Nginx 等外部反向代理，以在自定义子路径下提供 Mintlify 文档。

如果你在 Vercel 部署前使用了 Cloudflare 或 AWS CloudFront 等外部代理，则需要对其进行正确配置，以避免与 Vercel 的域名验证和 SSL 证书签发流程发生冲突。

错误的代理配置可能会阻止 Vercel 签发 Let's Encrypt SSL 证书，并导致域名验证失败。

请参阅 Vercel 文档中的[支持的提供商](https://vercel.com/guides/how-to-setup-verified-proxy#supported-providers-verified-proxy-lite)。

<div id="required-path-allowlist">
  ## 必需的路径白名单
</div>

你的外部代理必须允许访问以下特定路径的流量，不得阻止、重定向或进行强缓存：

* `/.well-known/acme-challenge/*` - 用于 Let's Encrypt 证书验证
* `/.well-known/vercel/*` - 用于 Vercel 域名验证
* `/mintlify-assets/_next/static/*` - 用于静态资源

这些路径应直接透传到你的 Vercel 部署，不进行任何修改。

<div id="header-forwarding-requirements">
  ## 请求头转发要求
</div>

确保你的代理正确转发 `HOST` 请求头。如果请求头未正确转发，验证请求会失败。

<div id="testing-your-proxy-setup">
  ## 测试你的代理配置
</div>

要验证你的代理是否已正确配置：

1. 测试 `https://[yourdomain].com/.well-known/vercel/` 是否有响应。
2. 确认 SSL 证书已在你的 Vercel 控制台中正确签发并生效。
3. 检查 domain 验证是否已成功完成。
