From 56f09052e5189561f5241705c41e89b42a2362be Mon Sep 17 00:00:00 2001 From: suvarnakale Date: Mon, 11 Nov 2024 18:19:25 +0530 Subject: [PATCH 1/2] Issue #PS-2326 feat: Tracking for content consumption activated --- next.config.mjs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 4ac7a4fb..723fd275 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -11,15 +11,15 @@ const remotes = (isServer) => { }; }; -const PORTAL_BASE_URL = "https://sunbird-editor.tekdinext.com"; +const PORTAL_BASE_URL = 'https://sunbird-editor.tekdinext.com'; const routes = { API: { GENERAL: { - CONTENT_PREVIEW: "/content/preview/:path*", - CONTENT_PLUGINS: "/content-plugins/:path*" - } - } + CONTENT_PREVIEW: '/content/preview/:path*', + CONTENT_PLUGINS: '/content-plugins/:path*', + }, + }, }; const nextConfig = { @@ -52,6 +52,10 @@ const nextConfig = { source: '/play/content/assets/:path*', // Match any URL starting with /workspace/content/assets/ destination: `${process.env.WORKSPACE_BASE_URL}/assets/:path*`, // Serve the assets from the public folder }, + { + source: '/action/v1/telemetry', // Match any URL starting with /workspace/content/assets/ + destination: `${process.env.NEXT_PUBLIC_TELEMETRY_URL}/v1/telemetry`, // Serve the assets from the public folder + }, { source: '/action/asset/:path*', // Match other /action/asset routes destination: `${process.env.WORKSPACE_BASE_URL}/api/proxy?path=/action/asset/:path*`, // Forward other /action/asset requests to proxy.js @@ -84,7 +88,7 @@ const nextConfig = { { source: routes.API.GENERAL.CONTENT_PLUGINS, destination: `${PORTAL_BASE_URL}${routes.API.GENERAL.CONTENT_PLUGINS}`, // Proxy to portal - } + }, ]; }, webpack: (config, { isServer }) => { From 2c2c7948013068fbbb5f1fe2a78405e086a36a00 Mon Sep 17 00:00:00 2001 From: suvarnakale Date: Mon, 11 Nov 2024 18:24:21 +0530 Subject: [PATCH 2/2] Issue #PS-2326 feat: comments removed --- next.config.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index 723fd275..8a39116b 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -53,8 +53,8 @@ const nextConfig = { destination: `${process.env.WORKSPACE_BASE_URL}/assets/:path*`, // Serve the assets from the public folder }, { - source: '/action/v1/telemetry', // Match any URL starting with /workspace/content/assets/ - destination: `${process.env.NEXT_PUBLIC_TELEMETRY_URL}/v1/telemetry`, // Serve the assets from the public folder + source: '/action/v1/telemetry', + destination: `${process.env.NEXT_PUBLIC_TELEMETRY_URL}/v1/telemetry`, }, { source: '/action/asset/:path*', // Match other /action/asset routes