Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GM_download adding Referer to headers will cause failure #2262

Open
BloodlineL opened this issue Nov 24, 2024 · 0 comments
Open

GM_download adding Referer to headers will cause failure #2262

BloodlineL opened this issue Nov 24, 2024 · 0 comments

Comments

@BloodlineL
Copy link

Expected Behavior

Execute Download

Actual Behavior

Works successfully in Firefox, fails in Chrome.
It works without adding Referer.

Specifications

  • Chromium: (131.0.6778.86)
  • TM: (5.3.2)
  • OS: (Windows10)

Script

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      2024-11-24
// @description  try to take over the world!
// @author       You
// @match        https://*/*
// @grant        GM_download
// ==/UserScript==

(function() {
    GM_download({
        headers: {
            Referer: ""
        },
        url: "https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png",
        name: "download.png",
        onload: () => console.log("success"),
        onerror: error => console.log(error),
    });
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant