I registered the I18nMiddleware globally and before any custom middleware, but when trying to access the I18n context within this middleware, it is undefined. In other cases it can be accessed normally.
I registered the I18nMiddleware as follows:
app.use(I18nMiddleware)
and the custom Middleware in the AppModule as follows:
consumer.apply(TenantMiddleware).exclude('/tenant(.*)', '/authentication(.*)', '/api-key(.*)').forRoutes('*')
I registered the I18nMiddleware globally and before any custom middleware, but when trying to access the I18n context within this middleware, it is undefined. In other cases it can be accessed normally.
I registered the I18nMiddleware as follows:
app.use(I18nMiddleware)
and the custom Middleware in the AppModule as follows:
consumer.apply(TenantMiddleware).exclude('/tenant(.*)', '/authentication(.*)', '/api-key(.*)').forRoutes('*')