diff --git a/src/lib/app.ts b/src/lib/app.ts index 6de9ec9fc41e..f3c1483904e5 100644 --- a/src/lib/app.ts +++ b/src/lib/app.ts @@ -112,6 +112,10 @@ export default async function getApp( `${baseUriPath}/api/frontend*`, corsOriginMiddleware(services, config), ); + app.options( + `${baseUriPath}/api/streaming*`, + corsOriginMiddleware(services, config), + ); app.use(baseUriPath, patMiddleware(config, services)); diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 5d49c13ae36c..72df262e2e70 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -59,7 +59,8 @@ export type IFlagKey = | 'showUserDeviceCount' | 'deleteStaleUserSessions' | 'memorizeStats' - | 'licensedUsers'; + | 'licensedUsers' + | 'streaming'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -279,6 +280,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_FLAG_LICENSED_USERS, false, ), + streaming: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_STREAMING, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = {