forked from naskya/firefish
fix (backend): check url properly
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
949084e218
commit
e4bcd23f9d
1 changed files with 3 additions and 1 deletions
|
@ -54,7 +54,9 @@ const bullBoardPath = "/queue";
|
|||
|
||||
// Authenticate
|
||||
app.use(async (ctx, next) => {
|
||||
if (ctx.path === bullBoardPath || ctx.path.startsWith(`${bullBoardPath}/`)) {
|
||||
const url = decodeURI(ctx.path);
|
||||
|
||||
if (url === bullBoardPath || url.startsWith(`${bullBoardPath}/`)) {
|
||||
const token = ctx.cookies.get("token");
|
||||
if (token == null) {
|
||||
ctx.status = 401;
|
||||
|
|
Loading…
Reference in a new issue