|
|
@ -12,6 +12,7 @@ export class FrontendMiddleware implements NestMiddleware { |
|
|
|
public indexHtmlDe = ''; |
|
|
|
public indexHtmlEn = ''; |
|
|
|
public indexHtmlIt = ''; |
|
|
|
public indexHtmlNl = ''; |
|
|
|
public isProduction: boolean; |
|
|
|
|
|
|
|
public constructor( |
|
|
@ -37,6 +38,10 @@ export class FrontendMiddleware implements NestMiddleware { |
|
|
|
this.getPathOfIndexHtmlFile('it'), |
|
|
|
'utf8' |
|
|
|
); |
|
|
|
this.indexHtmlNl = fs.readFileSync( |
|
|
|
this.getPathOfIndexHtmlFile('nl'), |
|
|
|
'utf8' |
|
|
|
); |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
@ -75,6 +80,15 @@ export class FrontendMiddleware implements NestMiddleware { |
|
|
|
rootUrl: this.configurationService.get('ROOT_URL') |
|
|
|
}) |
|
|
|
); |
|
|
|
} else if (req.path === '/nl' || req.path.startsWith('/nl/')) { |
|
|
|
res.send( |
|
|
|
this.interpolate(this.indexHtmlIt, { |
|
|
|
featureGraphicPath, |
|
|
|
languageCode: 'nl', |
|
|
|
path: req.path, |
|
|
|
rootUrl: this.configurationService.get('ROOT_URL') |
|
|
|
}) |
|
|
|
); |
|
|
|
} else { |
|
|
|
res.send( |
|
|
|
this.interpolate(this.indexHtmlEn, { |
|
|
|