diff --git a/next.config.mjs b/next.config.mjs index ef1e9f6b..7c767c51 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', + destination: `${process.env.NEXT_PUBLIC_TELEMETRY_URL}/v1/telemetry`, + }, { 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 }) => {