src/http/app.js
function stripProxyResHeaders(res) {
  return Object.entries(res.headers).reduce((memo, header) => {
    const [key, val] = header
    const invalid = [undefined, 'connection', 'content-encoding']
    if (invalid.indexOf(key) === -1) {
      memo[key] = val // eslint-disable-line
    }
    return memo
  }, {})
}
function stripProxyResHeaders(res) {
  return Object.entries(res.headers).reduce((memo, header) => {
    const [key, val] = header
    const invalid = [undefined, 'connection', 'content-encoding']
    if (invalid.indexOf(key) === -1) {
      memo[key] = val // eslint-disable-line
    }
    return memo
  }, {})
}
function stripProxyResHeaders ( res ) { return Object . entries ( res . headers ) . reduce ( ( memo , header ) => { const [ key , val ] = header const invalid = [ undefined , 'connection' , 'content-encoding' ] if ( invalid . indexOf ( key ) === - 1 ) { memo [ key ] = val // eslint-disable-line } return memo } , { } ) }
Strip connection control and transport encoding headers from the proxy response
@param {Object} res - proxy response
@return {Object}
Strip connection control and transport encoding headers from the proxy response