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

(cherry picked from commit d6f550c694486913025e91c3bbd3a2d1e27bc04e)
pull/375/head
王良 2 months ago
parent 34b996343c
commit c8d17c18f2

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

Loading…
Cancel
Save