|
|
@ -16,6 +16,7 @@ export class FrontendMiddleware implements NestMiddleware { |
|
|
|
public indexHtmlEs = ''; |
|
|
|
public indexHtmlIt = ''; |
|
|
|
public indexHtmlNl = ''; |
|
|
|
public indexHtmlPt = ''; |
|
|
|
public isProduction: boolean; |
|
|
|
|
|
|
|
public constructor( |
|
|
@ -49,6 +50,10 @@ export class FrontendMiddleware implements NestMiddleware { |
|
|
|
this.getPathOfIndexHtmlFile('nl'), |
|
|
|
'utf8' |
|
|
|
); |
|
|
|
this.indexHtmlPt = fs.readFileSync( |
|
|
|
this.getPathOfIndexHtmlFile('pt'), |
|
|
|
'utf8' |
|
|
|
); |
|
|
|
} catch {} |
|
|
|
} |
|
|
|
|
|
|
@ -126,6 +131,15 @@ export class FrontendMiddleware implements NestMiddleware { |
|
|
|
rootUrl: this.configurationService.get('ROOT_URL') |
|
|
|
}) |
|
|
|
); |
|
|
|
} else if (req.path === '/pt' || req.path.startsWith('/pt/')) { |
|
|
|
res.send( |
|
|
|
this.interpolate(this.indexHtmlPt, { |
|
|
|
featureGraphicPath, |
|
|
|
languageCode: 'pt', |
|
|
|
path: req.path, |
|
|
|
rootUrl: this.configurationService.get('ROOT_URL') |
|
|
|
}) |
|
|
|
); |
|
|
|
} else { |
|
|
|
response.send( |
|
|
|
this.interpolate(this.indexHtmlEn, { |
|
|
|