Skip to content

Commit

Permalink
fix(assets): security fix
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Oct 16, 2018
1 parent 5c50b67 commit 4f6c00d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/middleware/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ module.exports = function(app, db, callback) {

//CORS
app.use(allowCrossDomain);
app.use('/uploads/tickets', express.static(path.join(__dirname, '../../', 'public', 'uploads', 'tickets')));

//Mobile
app.use('/mobile', express.static(path.join(__dirname, '../../', 'mobile')));

app.use('/uploads/tickets', middleware.redirectToLogin, express.static(path.resolve(__dirname, '/public/uploads/tickets')));
app.use('/uploads/users', middleware.redirectToLogin, express.static(path.resolve(__dirname, '/public/uploads/users')));

app.use(express.static(path.join(__dirname, '../../', 'public')));

//Remove to enable plugins
Expand Down

0 comments on commit 4f6c00d

Please sign in to comment.