Skip to content

Commit 3f109cf

Browse files
committed
fix: allow '.path/.pnpm/node_modules' like (with ',')filepath for all spa files
AdminForth/1781/image
1 parent 8beee06 commit 3f109cf

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

adminforth/servers/express.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,11 @@ class ExpressServer implements IExpressHttpServer {
225225
const codeInjector = this.adminforth.codeInjector;
226226
this.expressApp.get(assetsRoute, (req, res) => {
227227
const fullPath = path.join(codeInjector.getServeDir(), replaceAtStart(req.url, prefix));
228-
console.log(`(2)Serving SPA for ${req.url} from ${fullPath}`);
229-
console.log("(2)Exists:", fs.existsSync(fullPath));
230228
res.sendFile(
231-
path.join(codeInjector.getServeDir(), replaceAtStart(req.url, prefix)),
229+
fullPath,
232230
{
233231
cacheControl: false,
232+
dotfiles: 'allow',
234233
// store for a year
235234
headers: {
236235
'Cache-Control': 'public, max-age=31536000',

0 commit comments

Comments
 (0)