Fix jwt-token

This commit is contained in:
2025-08-17 08:27:55 +02:00
parent bbccefe557
commit 8d53b2f74e
2 changed files with 4 additions and 23 deletions

View File

@@ -16,9 +16,10 @@ export const SocketProvider = ({ children }) => {
if (isAuthenticated) {
// Initialize socket connection
const newSocket = io(process.env.NODE_ENV === 'production'
? window.location.origin + '/drones'
: 'http://localhost:3001'
);
? window.location.origin
: 'http://localhost:3001', {
path: process.env.NODE_ENV === 'production' ? '/drones/socket.io/' : '/socket.io/'
});
newSocket.on('connect', () => {
console.log('Connected to server');