Skip to content

Commit

Permalink
Fix: Network requests getting randomly denied
Browse files Browse the repository at this point in the history
  • Loading branch information
Xzensi committed Jun 18, 2024
1 parent c35a569 commit 49b7066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ContentScripts/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ document.addEventListener('ntv_downstream', function (evt: Event) {
xhr.open(options.method || 'GET', url, true)
xhr.setRequestHeader('accept', 'application/json, text/plain, */*')

if (options.body || options.method !== 'GET') {
if (options.body) {
xhr.setRequestHeader('Content-Type', 'application/json')
}

Expand Down

0 comments on commit 49b7066

Please sign in to comment.