1
0
forked from mirror/misskey

GET非対応APIにGETでリクエストすると接続が開きっぱなしになる

Fix #9404
This commit is contained in:
syuilo 2022-12-24 13:55:50 +09:00
parent adbeff3a28
commit 4ede367c1e

View File

@ -82,6 +82,7 @@ export class ApiServerService {
}>('/' + endpoint.name, (request, reply) => {
if (request.method === 'GET' && !endpoint.meta.allowGet) {
reply.code(405);
reply.send();
return;
}
@ -95,6 +96,7 @@ export class ApiServerService {
}>('/' + endpoint.name, (request, reply) => {
if (request.method === 'GET' && !endpoint.meta.allowGet) {
reply.code(405);
reply.send();
return;
}