Skip to content

Commit

Permalink
fix(backend): ジョブキュー管理画面の認証を回避できる問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo authored and 16439s committed Mar 31, 2024
1 parent c9ad7a1 commit 4829d8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/backend/src/server/web/ClientServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ export class ClientServerService {

// Authenticate
fastify.addHook('onRequest', async (request, reply) => {
if (request.url === bullBoardPath || request.url.startsWith(bullBoardPath + '/')) {
// %71ueueとかでリクエストされたら困るため
const url = decodeURI(request.url);
if (url === bullBoardPath || url.startsWith(bullBoardPath + '/')) {
const token = request.cookies.token;
if (token == null) {
reply.code(401);
Expand Down

0 comments on commit 4829d8e

Please sign in to comment.