yusuketk 6 лет назад
Родитель
Сommit
17ec3215d5
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/server/routes/login-passport.js

+ 1 - 1
src/server/routes/login-passport.js

@@ -28,7 +28,7 @@ module.exports = function(crowi, app) {
 
       // prevention from open redirect
       try {
-        const redirectUrl = new URL(jumpTo, `${req.protocol}://${req.host}`);
+        const redirectUrl = new URL(jumpTo, `${req.protocol}://${req.get('host')}`);
         if (redirectUrl.hostname === req.hostname) {
           return res.redirect(redirectUrl);
         }