Skip to content

Commit

Permalink
fix: 프록시 서버 https
Browse files Browse the repository at this point in the history
  • Loading branch information
sjy2335 committed Nov 14, 2024
1 parent ca5df03 commit ca8a810
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/proxy-server/src/server/proxy-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ 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,
},
},
});
}
Expand Down Expand Up @@ -89,7 +92,7 @@ export class ProxyServer {
private async executeProxyRequest(request: FastifyRequest, reply: FastifyReply): Promise<void> {
const host = validateHost(request.headers[HOST_HEADER]);
const ip = await this.resolveDomain(host);
const targetUrl = buildTargetUrl(ip, request.url, 'http://'); // TODO: Protocol 별 arg 세팅
const targetUrl = buildTargetUrl(ip, request.url, 'https://'); // TODO: Protocol 별 arg 세팅

await this.sendProxyRequest(targetUrl, request, reply);
}
Expand Down

0 comments on commit ca8a810

Please sign in to comment.