-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Currently, I have the following:
// client
. . .
import { io } from 'socket.io-client';
. . .
const socket = io('https://my_domain.com', {
reconnectionDelay: 1000,
reconnection: true,
reconnectionAttemps: 10,
transports: ['websocket', 'polling', 'flashsocket'],
agent: false,
upgrade: true,
secure: process.env.NODE_ENV !== 'development',
rejectUnauthorized: false,
query: { userId: user.id },
});
// server
. . .
import fastifySocketIo from 'fastify-socket.io';
. . .
app.register(fastifySocketIo, {
pingInterval: 10000,
pingTimeout: 5000,
cookie: false,
});
. . .
Locally everything works just fine, but when NODE_ENV is set to production, a connection can't be made. What am I doing wrong here?
richyk1
Metadata
Metadata
Assignees
Labels
No labels