mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 07:36:46 +02: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) {
|
Controllers.compose = function(req, res, next) {
|
||||||
if (req.query.p && !res.locals.isAPI) {
|
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);
|
return helpers.redirect(res, req.query.p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user