fast-proxy icon indicating copy to clipboard operation
fast-proxy copied to clipboard

Overwriting requests agent and other properties with opts.request object

Open inspiredstuffs opened this issue 4 years ago • 1 comments

Thank you fo this amazing plugin.

This is a very minor change that will make this plugin more flexible.

I have override the request "agent:" property in function handleHttp1Req (opts, done) by prioritising ...opts.request. object.

This is just making sure that whenever we pass custom properties to opts.request object e.g. opts.request.agent, it will be prioritised and overwrites existing property declarations.

Checklist

inspiredstuffs avatar Jun 04 '21 01:06 inspiredstuffs

A bit late, but would you mind to add a test?

Eomm avatar Oct 08 '22 07:10 Eomm