Update WebSocket URL in terminal.blade.php to include /ws for consistency with the server configuration.

This commit is contained in:
Andras Bacsai
2024-09-13 16:58:16 +02:00
parent cddf8476de
commit dcf91cc034
4 changed files with 15 additions and 15 deletions

View File

@@ -17,8 +17,8 @@ const server = http.createServer((req, res) => {
const verifyClient = async (info, callback) => {
const cookies = cookie.parse(info.req.headers.cookie || '');
const origin = new URL(info.origin);
const protocol = origin.protocol;
// const origin = new URL(info.origin);
// const protocol = origin.protocol;
const xsrfToken = cookies['XSRF-TOKEN'];
// Generate session cookie name based on APP_NAME
@@ -53,7 +53,7 @@ const verifyClient = async (info, callback) => {
};
const wss = new WebSocketServer({ server, path: '/terminal', verifyClient: verifyClient });
const wss = new WebSocketServer({ server, path: '/terminal/ws', verifyClient: verifyClient });
const userSessions = new Map();
wss.on('connection', (ws) => {