From 996773fd373280de365402666fc42f55bc78c37b Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sun, 15 Jun 2025 10:27:12 +0700 Subject: [PATCH] fix(api): exclude routes with language codes --- apps/api/src/main.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index b7d15bf76..34ee76cab 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -1,7 +1,8 @@ import { DEFAULT_HOST, DEFAULT_PORT, - STORYBOOK_PATH + STORYBOOK_PATH, + SUPPORTED_LANGUAGE_CODES } from '@ghostfolio/common/config'; import { @@ -44,7 +45,10 @@ async function bootstrap() { type: VersioningType.URI }); app.setGlobalPrefix('api', { - exclude: ['sitemap.xml', '/:lang/auth/*wildcard'] + exclude: [ + 'sitemap.xml', + ...SUPPORTED_LANGUAGE_CODES.map((lang) => `/${lang}/*wildcard`) + ] }); app.useGlobalPipes( new ValidationPipe({