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)