mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 22:00:34 +01:00
fix composer redirect on relative path install
This commit is contained in:
@@ -135,6 +135,9 @@ Controllers.register = function(req, res, next) {
|
||||
|
||||
Controllers.compose = function(req, res, next) {
|
||||
if (req.query.p && !res.locals.isAPI) {
|
||||
if (req.query.p.startsWith(nconf.get('relative_path'))) {
|
||||
req.query.p = req.query.p.replace(nconf.get('relative_path'), '');
|
||||
}
|
||||
return helpers.redirect(res, req.query.p);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user