Skip to content

Commit

Permalink
Fix: 修正
Browse files Browse the repository at this point in the history
  • Loading branch information
itizawa committed Sep 15, 2024
1 parent de088c3 commit 9f08081
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions packages/api/src/controllers/passport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,7 @@ passportRoutes.get(
return next();
}

// ユーザーがアクセスしていたホスト名を取得
const host = req.headers.host || '';
// ローカルホストかどうかを確認
if (host.includes('localhost')) {
// ローカルホストの場合のリダイレクト先を設定(例: localhost:3000 へのリダイレクト)
const redirectUrl = 'http://localhost:3000';
return res.redirect(redirectUrl);
}

// サブドメインがある場合は、ホスト名に基づいてリダイレクト先を生成
const redirectUrl = `https://${host}`;
return res.redirect(redirectUrl);
res.redirect(FRONT_URL);
});
},
);
Expand Down

0 comments on commit 9f08081

Please sign in to comment.