1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-02 13:16:08 +02:00

fix: 添付ファイルのあるリクエストを受けたときの初動を改善 (#15896)

* wip

* ロールポリシーの値も参照するように

* エンドポイントのテストを追加

* fix review

* add spdx

* fix CHANGELOG.md

* fix test

* regenerate

* add log

* Revert "add log"

This reverts commit 4b2bf59a60.

* add log

* fix

* Revert "add log"

This reverts commit c5a73d57da.
This commit is contained in:
おさむのひと
2025-04-29 08:15:09 +09:00
committed by GitHub
parent e5fcb5b53f
commit 7e8cc4d7c0
8 changed files with 363 additions and 95 deletions

View File

@@ -73,7 +73,7 @@ export class ServerService implements OnApplicationShutdown {
}
@bindThis
public async launch(): Promise<void> {
public async launch() {
const fastify = Fastify({
trustProxy: true,
logger: false,
@@ -133,8 +133,8 @@ export class ServerService implements OnApplicationShutdown {
reply.header('content-type', 'text/plain; charset=utf-8');
reply.header('link', `<${encodeURI(location)}>; rel="canonical"`);
done(null, [
"Refusing to relay remote ActivityPub object lookup.",
"",
'Refusing to relay remote ActivityPub object lookup.',
'',
`Please remove 'application/activity+json' and 'application/ld+json' from the Accept header or fetch using the authoritative URL at ${location}.`,
].join('\n'));
});
@@ -301,6 +301,7 @@ export class ServerService implements OnApplicationShutdown {
}
await fastify.ready();
return fastify;
}
@bindThis