mirror of
https://github.com/siteboon/claudecodeui.git
synced 2025-12-13 13:49:43 +00:00
Fixes to json
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "claude-code-ui",
|
"name": "claude-code-ui",
|
||||||
"version": "1.3.0",
|
"version": "1.4.0",
|
||||||
"description": "A web-based UI for Claude Code CLI",
|
"description": "A web-based UI for Claude Code CLI",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "server/index.js",
|
"main": "server/index.js",
|
||||||
|
|||||||
@@ -131,7 +131,6 @@ async function setupProjectsWatcher() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the first non-localhost IP address
|
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const server = http.createServer(app);
|
const server = http.createServer(app);
|
||||||
@@ -181,8 +180,7 @@ app.use(express.static(path.join(__dirname, '../dist')));
|
|||||||
|
|
||||||
// API Routes (protected)
|
// API Routes (protected)
|
||||||
app.get('/api/config', authenticateToken, (req, res) => {
|
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';
|
const protocol = req.protocol === 'https' || req.get('x-forwarded-proto') === 'https' ? 'wss' : 'ws';
|
||||||
|
|
||||||
console.log('Config API called - Returning host:', host, 'Protocol:', protocol);
|
console.log('Config API called - Returning host:', host, 'Protocol:', protocol);
|
||||||
|
|||||||
Reference in New Issue
Block a user