فهرست منبع

add 'redirectFrom' when redirect to portal

Yuki Takei 7 سال پیش
والد
کامیت
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) {
       if (hasPortalPage) {
         logger.debug('The portal page is found', portalPagePath);
         logger.debug('The portal page is found', portalPagePath);
-        return res.redirect(portalPagePath);
+        return res.redirect(encodeURI(portalPagePath + '?redirectFrom=' + pagePathUtils.encodePagePath(req.path)));
       }
       }
     }
     }