From 1e3123e93ef8c93878d35be82ba01221c867ea2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Sun, 29 Sep 2024 12:12:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E9=97=AE=E9=A2=98=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/lib/interceptor/impl/res/AfterOPTIONSHeaders.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mitmproxy/src/lib/interceptor/impl/res/AfterOPTIONSHeaders.js b/packages/mitmproxy/src/lib/interceptor/impl/res/AfterOPTIONSHeaders.js index 336918b..b15622d 100644 --- a/packages/mitmproxy/src/lib/interceptor/impl/res/AfterOPTIONSHeaders.js +++ b/packages/mitmproxy/src/lib/interceptor/impl/res/AfterOPTIONSHeaders.js @@ -16,7 +16,7 @@ module.exports = { } // 替换响应头 - if (responseReplaceApi.replaceResponseHeaders(headers, res, proxyRes)) { + if (responseReplaceApi.replaceResponseHeaders({ ...headers }, res, proxyRes)) { res.setHeader('DS-AfterOPTIONSHeaders-Interceptor', true) log.info('AfterOPTIONSHeaders intercept:', JSON.stringify(headers)) }