Parcourir la source

add 'redirectFrom' when redirect to portal

Yuki Takei il y a 7 ans
Parent
commit
21f89a1702
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/server/routes/page.js

+ 1 - 1
src/server/routes/page.js

@@ -332,7 +332,7 @@ module.exports = function(crowi, app) {
 
       if (hasPortalPage) {
         logger.debug('The portal page is found', portalPagePath);
-        return res.redirect(portalPagePath);
+        return res.redirect(encodeURI(portalPagePath + '?redirectFrom=' + pagePathUtils.encodePagePath(req.path)));
       }
     }