常见跨域问题及处理方式
navigator crob
- 错误:Cross-Origin Read Blocking (CORB) blocked cross-origin response http://localhost:40439/v1/events with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.
const sendBeacon = (event) => {
const headers = {
type: 'application/x-www-form-urlencoded',
}
const blob = new Blob([JSON.stringify(event)], headers);
navigator.sendBeacon(`url, blob)
};