mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
closes #5749
This commit is contained in:
@@ -123,7 +123,7 @@ middleware.privateUploads = function (req, res, next) {
|
||||
if (req.user || parseInt(meta.config.privateUploads, 10) !== 1) {
|
||||
return next();
|
||||
}
|
||||
if (req.path.startsWith('/assets/uploads/files')) {
|
||||
if (req.path.startsWith(nconf.get('relative_path') + '/assets/uploads/files')) {
|
||||
return res.status(403).json('not-allowed');
|
||||
}
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user