mirror of
https://github.com/MyLuxy/overdrive.git
synced 2026-10-19 02:10:55 -05:00
fix: accept every vikingfile download server
This commit is contained in:
1 parent
5e8c06200d
commit
34663b95f9
1 file changed
+4
-1
@@ -60,7 +60,10 @@ import { sourceKind, webURL } from './download-sources.js';
|
||||
}
|
||||
function transferURL(url) {
|
||||
const parsed = webURL(url);
|
||||
if (!url.startsWith("https://") || parsed.origin !== `https://${parsed.host}` || parsed.path.includes("#") || !(["vikingfile.com", "ar.vikingfile.com", "vik1ngfile.site"].includes(parsed.host) || parsed.host.endsWith(".s3.bhs.io.cloud.ovh.net") || parsed.host.endsWith(".r2.cloudflarestorage.com")))
|
||||
// Vikingfile hands each file to one of its own servers (ar., am., zo. ... .vikingfile.com, seen
|
||||
// 2026-10-18): any of its subdomains is its own.
|
||||
const own = ["vikingfile.com", "vik1ngfile.site"].some((domain) => parsed.host === domain || parsed.host.endsWith(`.${domain}`));
|
||||
if (!url.startsWith("https://") || parsed.origin !== `https://${parsed.host}` || parsed.path.includes("#") || !(own || parsed.host.endsWith(".s3.bhs.io.cloud.ovh.net") || parsed.host.endsWith(".r2.cloudflarestorage.com")))
|
||||
throw new Error("Captured file redirected to an unsupported download host.");
|
||||
return url;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user