diff --git a/front/src/Phaser/Entity/PlayerTextures.ts b/front/src/Phaser/Entity/PlayerTextures.ts index 9c820681..bc484ceb 100644 --- a/front/src/Phaser/Entity/PlayerTextures.ts +++ b/front/src/Phaser/Entity/PlayerTextures.ts @@ -53,6 +53,7 @@ export class PlayerTextures { return new Promise((resolve, reject) => { fetch(url, { method: "GET", + // mode: 'no-cors', headers: { Host: "pusher.workadventure.localhost", }, diff --git a/pusher/src/Middleware/Cors.ts b/pusher/src/Middleware/Cors.ts index 876ac3a4..54fd32ad 100644 --- a/pusher/src/Middleware/Cors.ts +++ b/pusher/src/Middleware/Cors.ts @@ -9,7 +9,7 @@ export function cors(req: Request, res: Response, next?: MiddlewareNext): Middle "Origin, X-Requested-With, Content-Type, Accept, Authorization, Pragma, Cache-Control" ); res.setHeader("access-control-allow-methods", "GET, POST, OPTIONS, PUT, PATCH, DELETE"); - res.setHeader("access-control-allow-origin", "*"); + res.setHeader("access-control-allow-origin", FRONT_URL); if (next) { next();