diff --git a/package.json b/package.json index daabeb7..174b66f 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "claude-code-ui", - "version": "1.3.0", + "version": "1.4.0", "description": "A web-based UI for Claude Code CLI", "type": "module", "main": "server/index.js", diff --git a/server/index.js b/server/index.js index 529fa52..e564115 100755 --- a/server/index.js +++ b/server/index.js @@ -131,7 +131,6 @@ async function setupProjectsWatcher() { } } -// Get the first non-localhost IP address const app = express(); const server = http.createServer(app); @@ -181,8 +180,7 @@ app.use(express.static(path.join(__dirname, '../dist'))); // API Routes (protected) app.get('/api/config', authenticateToken, (req, res) => { - // Always use the server's actual IP and port for WebSocket connections -const host = req.headers.host || `${req.hostname}:${PORT}`; + const host = req.headers.host || `${req.hostname}:${PORT}`; const protocol = req.protocol === 'https' || req.get('x-forwarded-proto') === 'https' ? 'wss' : 'ws'; console.log('Config API called - Returning host:', host, 'Protocol:', protocol);