Browse Source

Bugfix/Google Sign-in hangs on redirect (#4926)

* Exclude routes with language codes
pull/4940/head
Kenrick Tandrian 2 weeks ago
committed by GitHub
parent
commit
ca8525a90c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      apps/api/src/main.ts

12
apps/api/src/main.ts

@ -1,7 +1,8 @@
import { import {
DEFAULT_HOST, DEFAULT_HOST,
DEFAULT_PORT, DEFAULT_PORT,
STORYBOOK_PATH STORYBOOK_PATH,
SUPPORTED_LANGUAGE_CODES
} from '@ghostfolio/common/config'; } from '@ghostfolio/common/config';
import { import {
@ -43,7 +44,14 @@ async function bootstrap() {
defaultVersion: '1', defaultVersion: '1',
type: VersioningType.URI type: VersioningType.URI
}); });
app.setGlobalPrefix('api', { exclude: ['sitemap.xml'] }); app.setGlobalPrefix('api', {
exclude: [
'sitemap.xml',
...SUPPORTED_LANGUAGE_CODES.map((languageCode) => {
return `/${languageCode}/*wildcard`;
})
]
});
app.useGlobalPipes( app.useGlobalPipes(
new ValidationPipe({ new ValidationPipe({
forbidNonWhitelisted: true, forbidNonWhitelisted: true,

Loading…
Cancel
Save