Add some more comments on why http / https is handled in different code paths

This commit is contained in:
Sander Declerck 2025-10-15 11:56:03 +02:00
parent 37ef3e187b
commit 05354ba2f0
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -55,7 +55,10 @@ export function mergeSafeChainProxyEnvironmentVariables(env) {
function createProxyServer() {
const server = http.createServer(
handleHttpProxyRequest // This handles plain HTTP requests
// This handles direct HTTP requests (non-CONNECT requests)
// This is normally http-only traffic, but we also handle
// https for clients that don't properly use CONNECT
handleHttpProxyRequest
);
// This handles HTTPS requests via the CONNECT method