valeriangalliat / fetch-cookie

Decorator for a `fetch` function to support automatic cookie storage and population. 🍪
The Unlicense
135 stars 29 forks source link

Not passing options further in redirects #48

Closed jajcek closed 4 years ago

jajcek commented 4 years ago

Hi,

in the node-fetch decorator fetch-cookie/node-fetch the options provided by user are not passed further through redirects, is it intentional? In some authentications (e.g. google) they require to have user-agent in every redirect, otherwise it forwards to inappropriate url. I think this line:

const optsForGet = Object.assign({}, {

should be changed into:

const optsForGet = Object.assign({}, userOptions, {

Br, hh

valeriangalliat commented 4 years ago

This is fixed thanks to #55, published as 0.10.0!