From 37523357095abd36fcd54d0e461543740a0bd8c9 Mon Sep 17 00:00:00 2001 From: cruizba Date: Mon, 1 Jul 2024 19:19:16 +0200 Subject: [PATCH] Add changeOrigin option in proxyGETRecording middleware This allows OpenVidu Call applications to recover recordings when OpenVidu Call and OpenVidu Server are running in different domains. --- openvidu-call-back/src/controllers/RecordingController.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/openvidu-call-back/src/controllers/RecordingController.ts b/openvidu-call-back/src/controllers/RecordingController.ts index ab2c3bae..d71d33e4 100644 --- a/openvidu-call-back/src/controllers/RecordingController.ts +++ b/openvidu-call-back/src/controllers/RecordingController.ts @@ -174,6 +174,7 @@ app.delete('/delete/:recordingId', async (req: Request, res: Response) => { export const proxyGETRecording = createProxyMiddleware({ target: `${OPENVIDU_URL}/openvidu/`, secure: CALL_OPENVIDU_CERTTYPE !== 'selfsigned', + changeOrigin: true, onProxyReq: (proxyReq, req: Request, res: Response) => { proxyReq.removeHeader('Cookie'); const recordingId: string = req.params.recordingId;