fix(backend): correct app favicon path

This commit is contained in:
Ali BARIN
2022-04-08 21:19:57 +02:00
committed by Ömer Faruk Aydın
parent 79fb62d409
commit 31403b7020
2 changed files with 12 additions and 2 deletions

View File

@@ -5,9 +5,19 @@ const appAssetsHandler = async (app: Application) => {
const appNames = App.list;
appNames.forEach(appName => {
const svgPath = `${__dirname}/../apps/${appName}/assets/favicon.svg`;
const staticFileHandlerOptions = {
/**
* Disabling fallthrough is important to respond with HTTP 404.
* Otherwise, web app might be served.
*/
fallthrough: false,
};
const staticFileHandler = express.static(svgPath, staticFileHandlerOptions);
app.use(
`/apps/${appName}/assets/favicon.svg`,
express.static(`src/apps/${appName}/assets/favicon.svg`)
staticFileHandler
)
})
}