@vacantthinker/firefox-addon-framework-easy 2026.623.1206 → 2026.623.1222

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"browserDownload.d.ts","sourceRoot":"","sources":["../src/browserDownload.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBvC"}
1
+ {"version":3,"file":"browserDownload.d.ts","sourceRoot":"","sources":["../src/browserDownload.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBvC"}
@@ -8,12 +8,14 @@ export async function browserDownloadByDownlink(params) {
8
8
  if (filename) {
9
9
  options.filename = filename;
10
10
  }
11
- // Inject the Referer header to bypass hotlink protection
12
- if (referrer && options.headers) {
13
- options.headers.push({
14
- name: 'referer',
15
- value: referrer
16
- });
11
+ // FIX: Explicitly assign the headers array if a referrer is provided
12
+ if (referrer) {
13
+ options.headers = [
14
+ {
15
+ name: 'Referer', // Fix spelling: canonical HTTP header name
16
+ value: referrer
17
+ }
18
+ ];
17
19
  }
18
20
  await browser.downloads.download(options);
19
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vacantthinker/firefox-addon-framework-easy",
3
- "version": "2026.0623.1206",
3
+ "version": "2026.0623.1222",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",