From c8d17c18f2a2892619b44688815a4713abdd09b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Mon, 30 Sep 2024 14:18:49 +0800 Subject: [PATCH] =?UTF-8?q?optimize:=20=E9=80=9A=E8=BF=87DS=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E7=9A=84=E8=AF=B7=E6=B1=82=EF=BC=8C=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=A4=B4=E6=B7=BB=E5=8A=A0=20`DS-Proxy-Request`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit d6f550c694486913025e91c3bbd3a2d1e27bc04e) --- .../mitmproxy/src/lib/proxy/mitmproxy/createRequestHandler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/mitmproxy/src/lib/proxy/mitmproxy/createRequestHandler.js b/packages/mitmproxy/src/lib/proxy/mitmproxy/createRequestHandler.js index 0f31424..08974d6 100644 --- a/packages/mitmproxy/src/lib/proxy/mitmproxy/createRequestHandler.js +++ b/packages/mitmproxy/src/lib/proxy/mitmproxy/createRequestHandler.js @@ -128,6 +128,7 @@ module.exports = function createRequestHandler (createIntercepts, middlewares, e // log.debug('rOptions:', rOptions.hostname + rOptions.path, '\r\n', rOptions) // log.debug('agent:', rOptions.agent) // log.debug('agent.options:', rOptions.agent.options) + res.setHeader('DS-Proxy-Request', rOptions.hostname) proxyReq = (rOptions.protocol === 'https:' ? https : http).request(rOptions, (proxyRes) => { const cost = new Date() - start if (rOptions.protocol === 'https:') {