Fixes to json

This commit is contained in:
simos
2025-07-13 15:30:22 +00:00
2 changed files with 2 additions and 4 deletions

View File

@@ -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",

View File

@@ -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);