Sfoglia il codice sorgente

set default accept header

Gildas 4 anni fa
parent
commit
9fb39d4aaa
2 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 0 0
      dist/single-file.js
  2. 1 1
      lib/single-file/single-file-util.js

File diff suppressed because it is too large
+ 0 - 0
dist/single-file.js


+ 1 - 1
lib/single-file/single-file-util.js

@@ -199,7 +199,7 @@ function getInstance(utilOptions) {
 			return { data: options.asBinary ? "data:null;base64," : "", resourceURL };
 		}
 		try {
-			const accept = options.acceptHeaders[options.expectedType] || "*/*";
+			const accept = options.acceptHeaders ? options.acceptHeaders[options.expectedType] : "*/*";
 			if (options.frameId) {
 				try {
 					response = await fetchFrameResource(resourceURL, { frameId: options.frameId, referrer: options.resourceReferrer, headers: { accept } });

Some files were not shown because too many files changed in this diff