From 476129c01ed0e485f79a608878d583b1d1067859 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Wed, 6 Dec 2023 10:36:43 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fproject?= =?UTF-8?q?/src/SocketConfig.ts'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/src/SocketConfig.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cryptide_project/src/SocketConfig.ts b/cryptide_project/src/SocketConfig.ts index b0c101d..2af1b9c 100644 --- a/cryptide_project/src/SocketConfig.ts +++ b/cryptide_project/src/SocketConfig.ts @@ -1,7 +1,13 @@ import { io } from "socket.io-client"; import { ADRESSE_WEBSERVER } from "./AdressSetup"; -const socket = io(ADRESSE_WEBSERVER); +const socket = io(ADRESSE_WEBSERVER, { + withCredentials: true, + extraHeaders: { + 'Access-Control-Allow-Origin': 'https://codefirst.iut.uca.fr/containers/Crypteam-website:80', // Replace with your client's domain and port + 'Access-Control-Allow-Credentials': 'true' + } +}); console.log(ADRESSE_WEBSERVER) console.log(socket.id)