Просмотр исходного кода

add 'redirectFrom' when redirect to portal

Yuki Takei 7 лет назад
Родитель
Сommit
21f89a1702
1 измененных файлов с 1 добавлено и 1 удалено
  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)));
       }
     }