From 7ce5a090321b286c227533726b12c8043a41de25 Mon Sep 17 00:00:00 2001 From: sjy2335 Date: Thu, 14 Nov 2024 16:23:11 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=9D=B4=EC=A0=84=20=EB=B2=84=EC=A0=84?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/proxy-server/src/server/proxy-server.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/backend/proxy-server/src/server/proxy-server.ts b/backend/proxy-server/src/server/proxy-server.ts index 0719b711..d80c4aa2 100644 --- a/backend/proxy-server/src/server/proxy-server.ts +++ b/backend/proxy-server/src/server/proxy-server.ts @@ -39,9 +39,6 @@ export class ProxyServer { connections: Number(process.env.DEFAULT_CONNECTIONS), pipelining: Number(process.env.DEFAULT_PIPELINING), keepAliveTimeout: Number(process.env.DEFAULT_KEEP_ALIVE), - connect: { - rejectUnauthorized: false, - }, }, }); } @@ -92,7 +89,7 @@ export class ProxyServer { private async executeProxyRequest(request: FastifyRequest, reply: FastifyReply): Promise { const host = validateHost(request.headers[HOST_HEADER]); const ip = await this.resolveDomain(host); - const targetUrl = buildTargetUrl(ip, request.url, 'https://'); // TODO: Protocol 별 arg 세팅 + const targetUrl = buildTargetUrl(ip, request.url, 'http://'); // TODO: Protocol 별 arg 세팅 await this.sendProxyRequest(targetUrl, request, reply); } @@ -117,8 +114,6 @@ export class ProxyServer { request: FastifyRequest, reply: FastifyReply, ): Promise { - const originalHost = request.headers[HOST_HEADER] as string; - await new Promise((resolve, reject) => { reply.from(targetUrl, { onError: (reply, error) => { @@ -130,11 +125,6 @@ export class ProxyServer { ), ); }, - - rewriteRequestHeaders: (req, headers) => ({ - ...headers, - host: originalHost, - }), }); }); }