Skip to content
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

defaultHeaders is being assigned to request.headers #1

Open
armoucar-neon opened this issue Oct 13, 2023 · 0 comments
Open

defaultHeaders is being assigned to request.headers #1

armoucar-neon opened this issue Oct 13, 2023 · 0 comments

Comments

@armoucar-neon
Copy link

There's an issue with the lib that makes defaultHeaders to be assigned to request.headers. It happens just after the execution of line 892 (dist code). When request.headers is undefined, then defaultHeaders is going to be assigned to request.headers because of how Object.assign works.

image



While debugging, we can check that after the execution of line 892:

image



This will lead to more bugs afterwards, because when logging the request.headers (which is defaultHeaders), the lib changes the 'Authorization' header value to [REDACTED], making this a default header that will override other 'Authorization' headers in subsequent calls.

image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant