tianyk commented on pull request #45:
URL: 
https://github.com/apache/skywalking-client-js/pull/45#issuecomment-793307955


   > > > Let me give you an example. We used an SDK for a local service, and 
now we can know the origin of the service they provide. However, the SDK may be 
upgraded and they may change the service address. The situation is out of your 
control. For example, an SDK in the form of Google Analytics(Just an example, 
Google Analytics does not use XHR). In addition, adding extra headers can be 
dangerous when crossing domains. Services (third) that are not processed across 
domains will not be available. To make the service more manageable, I suggest 
whitelisting. 吴晟 Wu Sheng 
[[email protected]](mailto:[email protected])于2021年3月6日 周六15:07写道:
   > > > […](#)
   > > > At least, if you insist you can't, use the regex to do exclusive 
match. — You are receiving this because you were mentioned. Reply to this email 
directly, view it on GitHub <[#45 
(comment)](https://github.com/apache/skywalking-client-js/pull/45#issuecomment-791887250)>,
 or unsubscribe 
https://github.com/notifications/unsubscribe-auth/AAZ3CNWD6LY4JTS5NXQSPGTTCHID3ANCNFSM4YURSEZQ
 .
   > > 
   > > 
   > > `skywalking-client-js` is dependent on browser. For the frontend web 
projects, if you use third-party projects in your own projects, probably, you 
should use iframe or a router with source codes. You said you didn't know the 
service address, do you use iframe in your web projects? If so, I have tested, 
the requests of the third party isn't set `sw8` in the header.
   > > 
![test](https://user-images.githubusercontent.com/20871783/110199914-ce38fc00-7e95-11eb-8894-a37b583ee6c8.png)
   > 
   > ```
   > <script 
src="https://cdn.jsdelivr.net/npm/[email protected]/lib/index.js";></script>
   > <script>
   >    // Comment out and try it here
   >    ClientMonitor.register({
   >            collector: 'http://127.0.0.1:8080',
   >            service: 'test-ui',
   >            pagePath: '/current/page/name',
   >            serviceVersion: 'v1.0.0'
   >    });
   > 
   >    fetch('http://kekek.cc/static/bear.bin');
   > </script>
   > ```
   
   @kezhenxu94 @wu-sheng @Fine0830 
   
   Is there any progress on this patch? 
   


----------------------------------------------------------------
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]


Reply via email to