fix(backend): correct app favicon path
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
79fb62d409
commit
31403b7020
@@ -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
|
||||
)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user