fix vd proxy not working
This commit is contained in:
parent
818e119cf5
commit
67bf70090a
2 changed files with 13 additions and 9 deletions
|
|
@ -77,7 +77,7 @@ const config = {
|
|||
constModules: {
|
||||
globals: {
|
||||
"bunny-build-info": {
|
||||
version: `"1.1.9-1"`,
|
||||
version: `"1.1.9-2"`,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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" });
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue