@@ -39,9 +39,6 @@ export class ProxyServer {
3939 connections : Number ( process . env . DEFAULT_CONNECTIONS ) ,
4040 pipelining : Number ( process . env . DEFAULT_PIPELINING ) ,
4141 keepAliveTimeout : Number ( process . env . DEFAULT_KEEP_ALIVE ) ,
42- connect : {
43- rejectUnauthorized : false ,
44- } ,
4542 } ,
4643 } ) ;
4744 }
@@ -92,7 +89,7 @@ export class ProxyServer {
9289 private async executeProxyRequest ( request : FastifyRequest , reply : FastifyReply ) : Promise < void > {
9390 const host = validateHost ( request . headers [ HOST_HEADER ] ) ;
9491 const ip = await this . resolveDomain ( host ) ;
95- const targetUrl = buildTargetUrl ( ip , request . url , 'https ://' ) ; // TODO: Protocol 별 arg 세팅
92+ const targetUrl = buildTargetUrl ( ip , request . url , 'http ://' ) ; // TODO: Protocol 별 arg 세팅
9693
9794 await this . sendProxyRequest ( targetUrl , request , reply ) ;
9895 }
@@ -117,8 +114,6 @@ export class ProxyServer {
117114 request : FastifyRequest ,
118115 reply : FastifyReply ,
119116 ) : Promise < void > {
120- const originalHost = request . headers [ HOST_HEADER ] as string ;
121-
122117 await new Promise < void > ( ( resolve , reject ) => {
123118 reply . from ( targetUrl , {
124119 onError : ( reply , error ) => {
@@ -130,11 +125,6 @@ export class ProxyServer {
130125 ) ,
131126 ) ;
132127 } ,
133-
134- rewriteRequestHeaders : ( req , headers ) => ( {
135- ...headers ,
136- host : originalHost ,
137- } ) ,
138128 } ) ;
139129 } ) ;
140130 }
0 commit comments