mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-21 16:33:48 +01:00
fix (backend): check url properly
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
9ac99d9f86
commit
e9ef70e272
@ -52,7 +52,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 New Issue
Block a user