mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-06 01:15:28 +02:00
chore: streaming spike (#8907)
We need this PR to correctly set up CORS for streaming-related endpoints in our spike and add the flag to our types. --------- Co-authored-by: kwasniew <kwasniewski.mateusz@gmail.com>
This commit is contained in:
parent
3879821396
commit
263aad4248
@ -112,6 +112,10 @@ export default async function getApp(
|
|||||||
`${baseUriPath}/api/frontend*`,
|
`${baseUriPath}/api/frontend*`,
|
||||||
corsOriginMiddleware(services, config),
|
corsOriginMiddleware(services, config),
|
||||||
);
|
);
|
||||||
|
app.options(
|
||||||
|
`${baseUriPath}/api/streaming*`,
|
||||||
|
corsOriginMiddleware(services, config),
|
||||||
|
);
|
||||||
|
|
||||||
app.use(baseUriPath, patMiddleware(config, services));
|
app.use(baseUriPath, patMiddleware(config, services));
|
||||||
|
|
||||||
|
@ -59,7 +59,8 @@ export type IFlagKey =
|
|||||||
| 'showUserDeviceCount'
|
| 'showUserDeviceCount'
|
||||||
| 'deleteStaleUserSessions'
|
| 'deleteStaleUserSessions'
|
||||||
| 'memorizeStats'
|
| 'memorizeStats'
|
||||||
| 'licensedUsers';
|
| 'licensedUsers'
|
||||||
|
| 'streaming';
|
||||||
|
|
||||||
export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
|
export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
|
||||||
|
|
||||||
@ -279,6 +280,10 @@ const flags: IFlags = {
|
|||||||
process.env.UNLEASH_EXPERIMENTAL_FLAG_LICENSED_USERS,
|
process.env.UNLEASH_EXPERIMENTAL_FLAG_LICENSED_USERS,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
|
streaming: parseEnvVarBoolean(
|
||||||
|
process.env.UNLEASH_EXPERIMENTAL_STREAMING,
|
||||||
|
false,
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const defaultExperimentalOptions: IExperimentalOptions = {
|
export const defaultExperimentalOptions: IExperimentalOptions = {
|
||||||
|
Loading…
Reference in New Issue
Block a user