wu-sheng commented on pull request #45: URL: https://github.com/apache/skywalking-client-js/pull/45#issuecomment-791358492
> > > I'm personally +1 to this new option, but wondering what's the reasonable default value to give it, now you didn't give any default value so all requests are not intercepted, right? Maybe set `window.location.host` as the default value? What do others think? > > > > > > This is an optional configuration, and it is backward compatible. If it's not configured, it's the same as now. All requests will be traced. > > OK, then it looks good to me. > > @wu-sheng does👇 make sense to you > > > Now, the SDK will intercept all XHR requests and add ws8 request headers. In the cross-domain, the server needs to add headers. > > Access-Control-Allow-Headers: sw8 > > https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests > > In some cases, we may request third party services. If a third party server does not add the top header, there will be cross-domain problems. > > The point is that some requests to 3rd-party servers cannot add `Access-Control-Allow-Headers: sw8` Make sense. @Fine0830 @arugal Please do code review. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
