-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(rules): fix header concatenation #394
Conversation
be7e71c
to
fb15642
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Is there any way to handle this merging more generically, so it isn't a special case for the headers
in particular?
https://lodash.com/docs/4.17.15#merge may be useful here?
I know Whichever way I arrange the All of these return
|
Ah okay, maybe it isn't working as expected because the headers object isn't just a plain Object but the |
I think I need to call Style-wise, I could use
|
The docs say that
|
Fixes #390
When two headers objects are passed to
fromFetch
, the last header object listed (config.headers
) seems to replace the previousheaders
object (login.getHeaders
). This appends the correctContent-type
, but removes theAuthorization
header from the request. Appending theconfig.headers
into the originalheaders
object, then passing in the updatedheaders
object last will preserve all the headers.