mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 00:10:25 +01:00
encodeURI redirect url
This commit is contained in:
@@ -53,7 +53,7 @@ helpers.notAllowed = function (req, res, error) {
|
|||||||
|
|
||||||
helpers.redirect = function (res, url) {
|
helpers.redirect = function (res, url) {
|
||||||
if (res.locals.isAPI) {
|
if (res.locals.isAPI) {
|
||||||
res.set('X-Redirect', url).status(200).json(url);
|
res.set('X-Redirect', encodeURI(url)).status(200).json(url);
|
||||||
} else {
|
} else {
|
||||||
res.redirect(nconf.get('relative_path') + encodeURI(url));
|
res.redirect(nconf.get('relative_path') + encodeURI(url));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user