From db0802e8fef43d4b25f3a3f20cb867fac1bdb505 Mon Sep 17 00:00:00 2001 From: Phillip Wirth Date: Thu, 5 Dec 2024 13:18:37 +0100 Subject: [PATCH] BC-8499 validate tldraw config in forRoot for boardcollabmodule if you do not pull the config to the forroot it does not get validated. if you config is not validated it gets to process.env as a fallback in process.env everything is a string, thus a thought to be boolean will be "false" resulting in if ("false") to be true in this particular case, it was WITH_TLDRAW2 that lead to this issue --- apps/server/src/modules/board/board-collaboration.config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/server/src/modules/board/board-collaboration.config.ts b/apps/server/src/modules/board/board-collaboration.config.ts index 5a74844d2af..72a55509f09 100644 --- a/apps/server/src/modules/board/board-collaboration.config.ts +++ b/apps/server/src/modules/board/board-collaboration.config.ts @@ -1,6 +1,7 @@ import { Configuration } from '@hpi-schul-cloud/commons'; import { JwtAuthGuardConfig } from '@infra/auth-guard'; import { Algorithm } from 'jsonwebtoken'; +import { getTldrawClientConfig } from '@modules/tldraw-client'; export interface BoardCollaborationConfig extends JwtAuthGuardConfig { NEST_LOG_LEVEL: string; @@ -13,6 +14,7 @@ const boardCollaborationConfig: BoardCollaborationConfig = { JWT_PUBLIC_KEY: (Configuration.get('JWT_PUBLIC_KEY') as string).replace(/\\n/g, '\n'), JWT_SIGNING_ALGORITHM: Configuration.get('JWT_SIGNING_ALGORITHM') as Algorithm, SC_DOMAIN: Configuration.get('SC_DOMAIN') as string, + ...getTldrawClientConfig(), }; export const config = () => boardCollaborationConfig;