From 084083129883ed0fdbbaeddf876c0a0eb61835bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 6 Nov 2024 15:13:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BC=93=E5=AD=98=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=E5=99=A8=EF=BC=8C=E5=AF=B9=20`300`=E3=80=81`301`=E3=80=81`302`?= =?UTF-8?q?=20=E7=9A=84=E5=93=8D=E5=BA=94=E4=B9=9F=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mitmproxy/src/lib/interceptor/impl/res/cacheRes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mitmproxy/src/lib/interceptor/impl/res/cacheRes.js b/packages/mitmproxy/src/lib/interceptor/impl/res/cacheRes.js index 8f81ba8..889d669 100644 --- a/packages/mitmproxy/src/lib/interceptor/impl/res/cacheRes.js +++ b/packages/mitmproxy/src/lib/interceptor/impl/res/cacheRes.js @@ -8,7 +8,7 @@ module.exports = { // 只有GET请求,且响应码为 2xx 或 3xx 时才进行缓存 const minStatusCode = interceptOpt.cacheMinStatusCode || 200 - const maxStatusCode = interceptOpt.cacheMaxStatusCode || 399 + const maxStatusCode = interceptOpt.cacheMaxStatusCode || 303 if (rOptions.method !== 'GET' || proxyRes.statusCode < minStatusCode || proxyRes.statusCode > maxStatusCode) { // res.setHeader('DS-Cache-Response-Interceptor', `skip: 'method' or 'status' not match`) return