mirror of
https://github.com/siteboon/claudecodeui.git
synced 2025-12-10 14:59:46 +00:00
refactor: remove unused /api/config endpoint and update WebSocket connection logic
This commit is contained in:
@@ -270,17 +270,8 @@ app.use(express.static(path.join(__dirname, '../dist'), {
|
||||
}));
|
||||
|
||||
// API Routes (protected)
|
||||
app.get('/api/config', authenticateToken, (req, res) => {
|
||||
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);
|
||||
|
||||
res.json({
|
||||
serverPort: PORT,
|
||||
wsUrl: `${protocol}://${host}`
|
||||
});
|
||||
});
|
||||
// /api/config endpoint removed - no longer needed
|
||||
// Frontend now uses window.location for WebSocket URLs
|
||||
|
||||
// System update endpoint
|
||||
app.post('/api/system/update', authenticateToken, async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user