Update nexus wiki content

This commit is contained in:
2026-05-03 05:42:06 +08:00
parent 90f3811b83
commit 111bc65b7b
707 changed files with 32306 additions and 7289 deletions

View File

@@ -0,0 +1,28 @@
---
title: "CORS-Allowlist"
type: concept
tags: []
sources: [expose-hermes-agent-as-an-openai-compatible-api-for-any-frontend]
last_updated: 2026-05-02
---
## Definition
CORS Allowlist跨域资源共享白名单是一种浏览器安全机制通过精确配置允许特定来源的跨域请求。
## Purpose
当浏览器中的前端应用(如 Open WebUI调用不同域的后端 API 时浏览器会先发送预检请求OPTIONS服务器需明确允许该来源才能放行。
## Configuration in Hermes Agent
Hermes Agent API Server 支持 CORS Allowlist 配置:
- **环境变量**`CORS_ALLOWED_ORIGINS` 设置允许的域名列表
- **默认值**:仅允许配置列表中的来源
- **安全建议**:生产环境仅开放必要的域名
## Example
```
CORS_ALLOWED_ORIGINS=https://app.openwebui.com,https://chat.example.com
```
## Related
- [[OpenAI-Compatible-API]]
- [[hermes-agent]]via Hermes-Agent.md