Skip to content

Commit

Permalink
BullBoardの認証をバイパスしてしまわないように
Browse files Browse the repository at this point in the history
  • Loading branch information
atsu1125 authored and mei23 committed Apr 14, 2024
1 parent af96fe6 commit e6c9e75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/backend/src/server/web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ const bullBoardPath = '/queue';

// Authenticate
app.use(async (ctx, next) => {
if (ctx.path === bullBoardPath || ctx.path.startsWith(bullBoardPath + '/')) {
// %71ueueとかでリクエストされたら困るため
const url = decodeURI(ctx.path);
if (url === bullBoardPath || url.startsWith(bullBoardPath + '/')) {
const token = ctx.cookies.get('token');
if (token == null) {
ctx.status = 401;
Expand Down

0 comments on commit e6c9e75

Please sign in to comment.