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: [email protected]
