Skip to content

Commit

Permalink
Add SSL certificate bypass for socket connection
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne committed Feb 14, 2024
1 parent 7584672 commit d6e3bf6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/contexts/SocketContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export default function SocketProvider({
return;
}
if (!socket) {
let socket = socketIO.connect(process.env.NEXT_PUBLIC_BASE_URL!);
let socket = socketIO.connect(process.env.NEXT_PUBLIC_BASE_URL!, {
rejectUnauthorized: false, // Ajoutez cette ligne si vous utilisez un certificat SSL auto-signé
});
socket.on("receive_message", (data: IMessage) => {
setMessages((prev) => {
const newMessages = { ...prev };
Expand Down

0 comments on commit d6e3bf6

Please sign in to comment.