0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-20 22:52:46 -05:00

fix: all static files are captured by the router

This commit is contained in:
Juan Picado @jotadeveloper 2019-04-16 19:11:40 +02:00
parent 372cd36497
commit 86a6e5eb7f
No known key found for this signature in database
GPG key ID: 18AC54485952D158

View file

@ -44,8 +44,10 @@ module.exports = function(config, auth, storage) {
const template = fs.readFileSync(indexTemplate).toString();
// Static
router.get('/-/static/:filename', function(req, res, next) {
const file = `${themePath}/${req.params.filename}`;
router.get('/-/static/*', function(req, res, next) {
const filename = req.params[0];
const file = `${themePath}/${filename}`;
res.sendFile(file, function(err) {
if (!err) {
return;