From 4735ae64516a82b525a8dfd16a04c4b91d1f23c0 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 26 Jan 2023 16:06:29 +0900 Subject: refactor: /proxyをFileServerServiceに統合し、/proxyのurlで/filesが指定されていた場合は直接ファイルを解決するようにする (#9709) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * wip? * clean up * Implement? HttpFetchService * :v: * remove node-fetch * fix * refactor * fix * gateway timeout * UndiciFetcherクラスを追加 (仮コミット, ビルドもstartもさせていない) * fix * add logger and fix url preview * fix ip check * enhance logger and error handling * fix * fix * clean up * Use custom fetcher for ApRequest / ApResolver * bypassProxyはproxyBypassHostsに判断を委譲するように * set maxRedirections (default 3, ApRequest/ApResolver: 0) * fix * wip???? * wip * :v: * set .node-version * clean up * refactor * clean up * refactor * refactor detectRequestType * rename detectResponseType * :v: * fix * wip * clean up * no got * remove got * wip * :v: * fix * clean up * remove unnnecessary const * good cleanup * no stream * Revert "no stream" This reverts commit 636f9192fcd2b17e71bbf6b5b106b490e0f66244. * fix * cache-control: max-age=300 to error * refactor cleanup --- packages/backend/src/server/ServerService.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'packages/backend/src/server/ServerService.ts') diff --git a/packages/backend/src/server/ServerService.ts b/packages/backend/src/server/ServerService.ts index eb6a3795eb..beb3a34ecd 100644 --- a/packages/backend/src/server/ServerService.ts +++ b/packages/backend/src/server/ServerService.ts @@ -20,7 +20,6 @@ import { NodeinfoServerService } from './NodeinfoServerService.js'; import { ApiServerService } from './api/ApiServerService.js'; import { StreamingApiServerService } from './api/StreamingApiServerService.js'; import { WellKnownServerService } from './WellKnownServerService.js'; -import { MediaProxyServerService } from './MediaProxyServerService.js'; import { FileServerService } from './FileServerService.js'; import { ClientServerService } from './web/ClientServerService.js'; @@ -48,7 +47,6 @@ export class ServerService { private wellKnownServerService: WellKnownServerService, private nodeinfoServerService: NodeinfoServerService, private fileServerService: FileServerService, - private mediaProxyServerService: MediaProxyServerService, private clientServerService: ClientServerService, private globalEventService: GlobalEventService, private loggerService: LoggerService, @@ -73,8 +71,7 @@ export class ServerService { } fastify.register(this.apiServerService.createServer, { prefix: '/api' }); - fastify.register(this.fileServerService.createServer, { prefix: '/files' }); - fastify.register(this.mediaProxyServerService.createServer, { prefix: '/proxy' }); + fastify.register(this.fileServerService.createServer); fastify.register(this.activityPubServerService.createServer); fastify.register(this.nodeinfoServerService.createServer); fastify.register(this.wellKnownServerService.createServer); -- cgit v1.2.3-freya