-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I include staticify like this:
const staticify = require('staticify')(path.join(__dirname, 'public'), { pathPrefix: '/public' });
app.use('/public', staticify.middleware);
This works when I receive requests for versioned files, but not if I request the file without including the hash
I can work around the issue using the code below, but it'd be nice if staticify.middleware did this for me
if (!isProd) {
app.use(function(req, res, next) {
if (req.url.startsWith('/javascripts') || req.url.startsWith('/css')) {
req.url = '/public/' + req.url;
}
next();
});
}
Metadata
Metadata
Assignees
Labels
No labels