Spaces:
Running
Running
Update Caddyfile
Browse files
Caddyfile
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
:7860 {
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
| 3 |
reverse_proxy localhost:8000 {
|
| 4 |
-
# 强制设置 Accept 头,覆盖客户端的请求头
|
| 5 |
-
header_up Accept "application/json, text/event-stream"
|
| 6 |
-
# SSE 长连接支持
|
| 7 |
flush_interval -1
|
| 8 |
}
|
| 9 |
}
|
|
|
|
| 1 |
:7860 {
|
| 2 |
+
# MCP 直接透传,添加 Accept 头
|
| 3 |
+
@mcp path /mcp*
|
| 4 |
+
handle @mcp {
|
| 5 |
+
request_header Accept "application/json, text/event-stream"
|
| 6 |
reverse_proxy localhost:8000 {
|
|
|
|
|
|
|
|
|
|
| 7 |
flush_interval -1
|
| 8 |
}
|
| 9 |
}
|