[英]Can I somehow add an 'Accepts' header in an HTTP browser download request
[英]Bugsnag from a browser: is there a way I can add my own header?
使用"@bugsnag/browser": "7.5.6"
我已將bugsnag
配置為通過執行以下操作將請求發送到自定義端點:
Bugsnag.start({
...
autoTrackSessions: false,
endpoints: {
notify: 'htts://custom-notify-url.example.com',
sessions: 'https://bugsnag-sessions.example.com',
},
onError: async function (event: any) {
console.log("bugsnag error event", event);
},
})
這有效,並將請求發送到custom-notify-url.example.com
但我需要 bugsnag 請求有一個特定的 header。
是否可以配置 bugsnag 以便將自定義 header 應用於通知POST
請求?
Bugsnag 的錯誤報告 API,這是他們所有的庫都使用的,不支持在 header 中傳遞自定義字段。 如果您最終將事件轉發到 notify.bugsnag.com,您將無法擁有自定義 header - 您也無法覆蓋自定義端點的 Z099FB995346F31C749F6E40DB0F395EZ。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.