mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-06 16:31:12 +08:00
fix: 使用127.0.0.1替代localhost以确保IPv4连接,避免IPv6解析问题
This commit is contained in:
@@ -83,7 +83,7 @@ When `--yes` or `-y`: Auto-confirm exploration decisions, use recommended analys
|
|||||||
|
|
||||||
Codebase exploration FIRST, then CLI analysis.
|
Codebase exploration FIRST, then CLI analysis.
|
||||||
|
|
||||||
**Step 1: Codebase Exploration** (cli-explore-agent, parallel up to 4)
|
**Step 1: Codebase Exploration** (cli-explore-agent, parallel up to 6)
|
||||||
|
|
||||||
- **Single**: General codebase analysis → `{sessionFolder}/exploration-codebase.json`
|
- **Single**: General codebase analysis → `{sessionFolder}/exploration-codebase.json`
|
||||||
- **Multi-perspective**: Parallel per-perspective → `{sessionFolder}/explorations/{perspective}.json`
|
- **Multi-perspective**: Parallel per-perspective → `{sessionFolder}/explorations/{perspective}.json`
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ const basePath = process.env.VITE_BASE_URL || '/'
|
|||||||
|
|
||||||
// Backend target for Vite proxy (used when directly opening the Vite dev server port).
|
// Backend target for Vite proxy (used when directly opening the Vite dev server port).
|
||||||
// In `ccw view`, this is set to the dashboard server port so /api and /ws route correctly.
|
// In `ccw view`, this is set to the dashboard server port so /api and /ws route correctly.
|
||||||
const backendHost = process.env.VITE_BACKEND_HOST || 'localhost'
|
// Use 127.0.0.1 instead of localhost to ensure IPv4 connection (avoid IPv6 resolution issues)
|
||||||
|
const backendHost = process.env.VITE_BACKEND_HOST || '127.0.0.1'
|
||||||
const backendPort = Number(process.env.VITE_BACKEND_PORT || '3456')
|
const backendPort = Number(process.env.VITE_BACKEND_PORT || '3456')
|
||||||
const backendHttpTarget = `http://${backendHost}:${backendPort}`
|
const backendHttpTarget = `http://${backendHost}:${backendPort}`
|
||||||
const backendWsTarget = `ws://${backendHost}:${backendPort}`
|
const backendWsTarget = `ws://${backendHost}:${backendPort}`
|
||||||
|
|||||||
@@ -771,7 +771,7 @@ export async function startServer(options: ServerOptions = {}): Promise<http.Ser
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, proxy to Vite dev server
|
// Otherwise, proxy to Vite dev server
|
||||||
const reactUrl = `http://localhost:${reactPort}${pathname}${url.search}`;
|
const reactUrl = `http://127.0.0.1:${reactPort}${pathname}${url.search}`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Convert headers to plain object for fetch
|
// Convert headers to plain object for fetch
|
||||||
@@ -783,7 +783,7 @@ export async function startServer(options: ServerOptions = {}): Promise<http.Ser
|
|||||||
proxyHeaders[key] = value.join(', ');
|
proxyHeaders[key] = value.join(', ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
proxyHeaders['host'] = `localhost:${reactPort}`;
|
proxyHeaders['host'] = `127.0.0.1:${reactPort}`;
|
||||||
|
|
||||||
const reactResponse = await fetch(reactUrl, {
|
const reactResponse = await fetch(reactUrl, {
|
||||||
method: req.method,
|
method: req.method,
|
||||||
|
|||||||
Reference in New Issue
Block a user