Skip to content

Commit

Permalink
Merge pull request #385 from suvarnakale/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-2326 feat: Tracking for content consumption activated
  • Loading branch information
itsvick authored Nov 11, 2024
2 parents 0eccc88 + 2c2c794 commit a56ef39
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }) => {
Expand Down

0 comments on commit a56ef39

Please sign in to comment.