router to static resources to serve logo
ADD
src/assets/images/logo.png
src/assets/images/logo.png
Binary files /dev/null and b/src/assets/images/logo.png differ

MODIFY
src/server/rest/v1/router/GlobalRouterV1.ts
src/server/rest/v1/router/GlobalRouterV1.ts
@@ -18,6 +18,7 @@ import SessionHashService from '../service/SessionHashService';
import SettingRouter from './api/SettingRouter';
import SiteAreaRouter from './api/SiteAreaRouter';
import SiteRouter from './api/SiteRouter';
+import StaticResourceRouter from './doc/StaticResourceRouter';
import StatisticsRouter from './api/StatisticsRouter';
import SwaggerRouter from './doc/SwaggerRouter';
import TagRouter from './api/TagRouter';
@@ -39,6 +40,7 @@ export default class GlobalRouterV1 {
this.buildRouteAPI();
this.buildRouteUtil();
this.buildRouteDocs();
+ this.buildRouteToStaticResources();
return this.router;
}
@@ -87,4 +89,8 @@ export default class GlobalRouterV1 {
protected buildRouteDocs(): void {
this.router.use('/docs', new SwaggerRouter().buildRoutes());
}
+
+ protected buildRouteToStaticResources(): void {
+ this.router.use('/assets', new StaticResourceRouter().buildRoutes());
+ }
}

ADD
src/server/rest/v1/router/doc/StaticResourceRouter.ts
+import express from 'express';
+import global from '../../../../../types/GlobalType';
+
+export default class StaticResourceRouter {
+ private router: express.Router;
+
+ public constructor() {
+ this.router = express.Router();
+ }
+
+ public buildRoutes(): express.Router {
+ // ##CR - To be removed - introduced only to troubleshoot logo rendering issues in mail (Outlook)
+ this.router.use('/images', express.static(`${global.appRoot}/assets/images`));
+ return this.router;
+ }
+}
+

router to static resources to serve logo