Skip to content

Commit

Permalink
setting accept header sometimes break things
Browse files Browse the repository at this point in the history
  • Loading branch information
StigNygaard committed Feb 25, 2024
1 parent d96f3a8 commit f956b82
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions WebExtension/backgroundscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,6 @@ browser.runtime.onMessage.addListener(
const fetchOptions = message.fetchOptions;
fetchOptions.credentials = 'omit'; // Recommended by Mozilla
fetchOptions.cache = 'no-cache'; // Recommended by Mozilla
if (!fetchOptions.headers) {
// https://developer.mozilla.org/en-US/docs/Web/API/Request/headers
fetchOptions.headers = new Headers({'Accept': 'image/*'});
} // or use Headers.append() !?
const fetchTimeout = 8000; // 8 seconds
if (AbortSignal?.timeout) {
fetchOptions.signal = AbortSignal.timeout(fetchTimeout);
Expand Down

0 comments on commit f956b82

Please sign in to comment.