fix: improve paths for windows os

This commit is contained in:
Jakub P.
2024-07-26 11:30:55 +02:00
committed by Ali BARIN
parent 09d3a06b27
commit a755ee8dc1
5 changed files with 9 additions and 9 deletions

View File

@@ -7,7 +7,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
const appAssetsHandler = async (app) => {
app.use('/apps/:appKey/assets/favicon.svg', (req, res, next) => {
const { appKey } = req.params;
const svgPath = `${__dirname}/../apps/${appKey}/assets/favicon.svg`;
const svgPath = path.resolve(`${__dirname}/../apps/${appKey}/assets/favicon.svg`);
const staticFileHandlerOptions = {
/**
* Disabling fallthrough is important to respond with HTTP 404.