fix(backend): ジョブキュー管理画面の認証を回避できる問題を修正 (MisskeyIO#207)
cheery-picked from c9aeccb2ab
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
parent
ac3c6f3df8
commit
6a06711ffd
|
@ -144,7 +144,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);
|
||||
|
|
Loading…
Reference in a new issue