diff options
| -rw-r--r-- | public/_redirects | 2 | ||||
| -rw-r--r-- | server/index.js | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/public/_redirects b/public/_redirects index 41c4156..c2e9c76 100644 --- a/public/_redirects +++ b/public/_redirects @@ -14,5 +14,3 @@ /resume https://drive.google.com/file/d/1S49c4nQEpY5IeQNkTcLlnabz664RlnAj/view /bbg/discord https://discord.gg/dT6cbHqXdx - -/shadow-vrchat.ps1 https://raw.githubusercontent.com/zuedev/monorepo/main/unsorted/Shadow%20VRChat%20Devbox/setup.ps1
\ No newline at end of file diff --git a/server/index.js b/server/index.js index 8812cb2..84a4f55 100644 --- a/server/index.js +++ b/server/index.js @@ -29,6 +29,20 @@ export default { if (url.hostname === "bbg.zue.dev") return Response.redirect(`https://zue.dev/bbg/${url.pathname}`, 301); + if (url.pathname === "/shadow-vrchat.ps1") { + // fetch the script first + const scriptResponse = await fetch( + "https://raw.githubusercontent.com/zuedev/monorepo/main/unsorted/Shadow%20VRChat%20Devbox/setup.ps1" + ); + + // return the script with the correct content-type + return new Response(scriptResponse.body, { + headers: { + "Content-Type": "application/octet-stream", + }, + }); + } + if (url.pathname.startsWith("/api")) { const pathname = url.pathname.replace("/api", ""); |
