diff --git a/.gitignore b/.gitignore index bfb41a63c..143763ebb 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ CLAUDE.md test-results playwright-report + +superpowers diff --git a/src/pages/install/App.tsx b/src/pages/install/App.tsx index 6bbb48d51..efea71d29 100644 --- a/src/pages/install/App.tsx +++ b/src/pages/install/App.tsx @@ -67,7 +67,6 @@ const fetchScriptBody = async (url: string, { onProgress }: { [key: string]: any const response = await fetch(url, { headers: { "Cache-Control": "no-cache", - Accept: "text/javascript,application/javascript,text/plain,application/octet-stream,application/force-download", // 参考:加权 Accept-Encoding 值说明 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Accept-Encoding#weighted_accept-encoding_values "Accept-Encoding": "br;q=1.0, gzip;q=0.8, *;q=0.1", @@ -83,10 +82,6 @@ const fetchScriptBody = async (url: string, { onProgress }: { [key: string]: any if (!response.body || !response.headers) { throw new Error("No response body or headers"); } - if (response.headers.get("content-type")?.includes("text/html")) { - throw new Error("Response is text/html, not a valid UserScript"); - } - const reader = response.body.getReader(); // 读取数据