New features: - HLS video encoding/streaming (hls routes, hls-encoder) and a media transcripts pipeline (transcripts route + media-transcript queries) - AI assistant chat vs. run model: agent-course-generation worker/queue, run-monitor pane, chat-changes card, content ask-ai bar - Per-theme course-page previews across org landing-page themes (bold, classic, corporate, editorial, etc.) with a shared course token/component set - View-as-student mode and login-link / link-invite invite flows Refactor: - Extract packages/core consolidating config (env, storage, dashboard-url), services and utils previously duplicated under apps/api/src/config - Remove legacy agent service modules (chat-tools, chat-context, context-window, document, fetch-url, lesson-content) - Relax Cross-Origin-Resource-Policy to allow cross-origin media embedding - Add format script to tenant-router so turbo run format covers it
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
const {
|
|
DASHBOARD_ORIGIN,
|
|
PUBLIC_IS_SELFHOSTED,
|
|
PUBLIC_SERVER_URL,
|
|
TRUSTED_ORIGINS: TRUSTED_ORIGINS_STRING
|
|
} = process.env;
|
|
|
|
const dashboardOrigin = DASHBOARD_ORIGIN?.trim().replace(/\/$/, '');
|
|
|
|
const DEFAULT_TRUSTED_ORIGINS = [
|
|
'http://localhost:5173',
|
|
'https://*.classroomio.com',
|
|
'https://*.myclassroomio.com',
|
|
// Common OIDC IdP discovery origins (SSO registration fetches .well-known/openid-configuration)
|
|
'https://accounts.google.com',
|
|
'https://account.google.com', // common typo for Google
|
|
'https://oauth2.googleapis.com', // Google token endpoint (from discovery)
|
|
'https://openidconnect.googleapis.com', // Google userinfo endpoint (from discovery)
|
|
'https://www.googleapis.com', // Google jwks_uri (from discovery)
|
|
'https://login.microsoftonline.com',
|
|
'https://login.live.com',
|
|
'https://auth0.com',
|
|
'https://login.okta.com'
|
|
];
|
|
|
|
export const TRUSTED_ORIGINS = [
|
|
...DEFAULT_TRUSTED_ORIGINS,
|
|
...(TRUSTED_ORIGINS_STRING
|
|
? TRUSTED_ORIGINS_STRING.split(',')
|
|
.map((origin) => origin.trim())
|
|
.filter(Boolean)
|
|
: []),
|
|
...(dashboardOrigin ? [dashboardOrigin] : [])
|
|
];
|
|
|
|
export const BASE_URL =
|
|
PUBLIC_IS_SELFHOSTED === 'true' && dashboardOrigin ? dashboardOrigin : PUBLIC_SERVER_URL || 'http://localhost:3002';
|