optimize: 通过DS代理的请求,响应头添加 `DS-Proxy-Request`

(cherry picked from commit d6f550c694)
pull/375/head
王良 2024-09-30 14:18:49 +08:00
parent 34b996343c
commit c8d17c18f2
1 changed files with 1 additions and 0 deletions

View File

@ -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:') {