weareoutman opened a new issue, #12367:
URL: https://github.com/apache/skywalking/issues/12367

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache SkyWalking Component
   
   NodeJS Client Side Agent (apache/skywalking-client-js)
   
   ### What happened
   
   Relevant code: 
https://github.com/apache/skywalking-client-js/blob/e36b33bb415b7cef6a280d0e4579f9f3327b7d0b/src/trace/interceptors/fetch.ts#L82-L91
   
   <img width="368" alt="image" 
src="https://github.com/apache/skywalking/assets/2338946/9e6b4596-c107-48f7-a019-c0a828e48a5b";>
   
   If we call fetch with a Request object which contains headers, these headers 
will be dropped if enable skywalking-client-js.
   
   ### What you expected to happen
   
   Keep user defined headers.
   
   ### How to reproduce
   
   https://codesandbox.io/p/sandbox/skywalking-headers-bug-repro-ss74fd
   
   Open the devtools, switch to network tab, filter Fetch/XHR, open details for 
the request `/api/projects`, in Request Headers, user defined header 
`My-Custom-Header` is missing.
   
   While change the value of `enableClientMonitor` to `false` in `monitor.mjs`, 
the header `My-Custom-Header` exists as expected.
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
notifications-unsubscr...@skywalking.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to