Skip to content

Commit

Permalink
fix: all static files are captured by the router
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpicado committed Apr 16, 2019
1 parent 372cd36 commit 86a6e5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/api/web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 86a6e5e

Please sign in to comment.