fix vd proxy not working

This commit is contained in:
kmmiio99o 2025-11-07 18:52:30 +01:00
parent 818e119cf5
commit 67bf70090a
2 changed files with 13 additions and 9 deletions

View file

@ -77,7 +77,7 @@ const config = {
constModules: {
globals: {
"bunny-build-info": {
version: `"1.1.9-1"`,
version: `"1.1.9-2"`,
},
},
},

View file

@ -48,14 +48,18 @@ const pluginInstance: Record<string, EvaledPlugin> = {};
export const VdPluginManager = {
plugins,
async pluginFetch(url: string) {
if (url.startsWith(VD_PROXY_PREFIX)) {
url = url
.replace(
"https://bunny-mod.github.io/plugins-proxy",
BUNNY_PROXY_PREFIX,
)
.replace(VD_PROXY_PREFIX, BUNNY_PROXY_PREFIX);
}
// was causing problems, dumb me with redirections
// :3
// No redirection: use VD_PROXY_PREFIX as intended
// if (url.startsWith(VD_PROXY_PREFIX)) {
// url = url
// .replace(
// "https://bunny-mod.github.io/plugins-proxy",
// BUNNY_PROXY_PREFIX,
// )
// .replace(VD_PROXY_PREFIX, BUNNY_PROXY_PREFIX);
// }
// End of pluginFetch function block
return await safeFetch(url, { cache: "no-store" });
},