You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/03/05 03:28:20 UTC

[GitHub] [skywalking-client-js] tianyk opened a new pull request #44: 添加origin白名单

tianyk opened a new pull request #44:
URL: https://github.com/apache/skywalking-client-js/pull/44


   默认情况下会拦截**所有**的xhr请求,添加 `ws8` 头部用于追踪。
   
   添加头部后的请求就不再是[简单请求](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/CORS#%E7%AE%80%E5%8D%95%E8%AF%B7%E6%B1%82),浏览器会发起预请求。
   
   ```
   Access-Control-Request-Headers: ws8
   ```
   
   需要服务器在响应头都添加一下头部
   ```
   Access-Control-Allow-Headers: ws8
   ```
   
   对于不受控制的第三方服务,这样很不好做。建议添加`origin`白名单,实现对白名单内服务`xhr`的请求拦截。
   
   
   
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [skywalking-client-js] wu-sheng commented on pull request #44: add originAllowlist option

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #44:
URL: https://github.com/apache/skywalking-client-js/pull/44#issuecomment-791159989


   Please explain the use case why and when will need this.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [skywalking-client-js] kezhenxu94 commented on pull request #44: 添加origin白名单

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #44:
URL: https://github.com/apache/skywalking-client-js/pull/44#issuecomment-791133045


   @tianyk thanks, but please rewrite all the messages (including PR title, comments, commit messages) to English because this is a global project not only targeting Chinese users, also, I'd prefer rename `originWhitelist` to `originAllowlist`


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [skywalking-client-js] tianyk commented on pull request #44: add originAllowlist option

Posted by GitBox <gi...@apache.org>.
tianyk commented on pull request #44:
URL: https://github.com/apache/skywalking-client-js/pull/44#issuecomment-791158990


   > @tianyk thanks, but please rewrite all the messages (including PR title, comments, commit messages) to English because this is a global project not only targeting Chinese users, also, I'd prefer rename `originWhitelist` to `originAllowlist`
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [skywalking-client-js] tianyk closed pull request #44: add originAllowlist option

Posted by GitBox <gi...@apache.org>.
tianyk closed pull request #44:
URL: https://github.com/apache/skywalking-client-js/pull/44


   


----------------------------------------------------------------
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:
users@infra.apache.org