mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01: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*`,
|
||||
corsOriginMiddleware(services, config),
|
||||
);
|
||||
app.options(
|
||||
`${baseUriPath}/api/streaming*`,
|
||||
corsOriginMiddleware(services, config),
|
||||
);
|
||||
|
||||
app.use(baseUriPath, patMiddleware(config, services));
|
||||
|
||||
|
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user