Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

📝 docs: add info callout for desktop client access in Cloudflare R2 configuration (#8728)

Moraxe1424ad797be
diff --git a/docs/self-hosting/advanced/s3/cloudflare-r2.mdx b/docs/self-hosting/advanced/s3/cloudflare-r2.mdx
index 28aaf881b9e..17bc8860bbf 100644
--- a/docs/self-hosting/advanced/s3/cloudflare-r2.mdx
+++ b/docs/self-hosting/advanced/s3/cloudflare-r2.mdx
@@ -84,12 +84,16 @@ We need to configure an S3 storage service in the server-side database to store
<Image alt={'Configure allowed site domain'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/dfcc2cb3-2958-4498-a8a4-51bec584fe7d'} />
+ <Callout type={'info'}>
+ If you also plan to use the desktop client, add <code>http://localhost:3015</code> to <code>AllowedOrigins</code> so the desktop client (running locally) can access R2.
+ </Callout>
+
Example configuration is as follows:
```json
[
{
- "AllowedOrigins": ["https://your-project.vercel.app"],
+ "AllowedOrigins": ["https://your-project.vercel.app", "http://localhost:3015"],
"AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"],
"AllowedHeaders": ["*"]
}
diff --git a/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx b/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx
index a0de1f88abd..3886cfae96e 100644
--- a/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx
+++ b/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx
@@ -82,13 +82,17 @@ tags:
添加跨域规则,允许你的域名(在上文是 `https://your-project.vercel.app`)来源的请求:
<Image alt={'配置允许你的站点域名'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/dfcc2cb3-2958-4498-a8a4-51bec584fe7d'} />
+ <Callout type={'info'}>
+ 如果你还需要在桌面端使用,请在 <code>AllowedOrigins</code> 中额外添加 <code>http://localhost:3015</code>,以便桌面端(本地运行)能够访问 R2。
+ </Callout>
+
示例配置如下:
```json
[
{
- "AllowedOrigins": ["https://your-project.vercel.app"],
+ "AllowedOrigins": ["https://your-project.vercel.app", "http://localhost:3015"],
"AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"],
"AllowedHeaders": ["*"]
}