mirror of
https://github.com/siteboon/claudecodeui.git
synced 2025-12-10 11:09:38 +00:00
Fixes to json
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user