Skip to content

Commit

Permalink
Revert "Revert "Direct drop-lookup requests to github pages""
Browse files Browse the repository at this point in the history
This reverts commit 87ec12b.
  • Loading branch information
squaresmile committed Aug 25, 2023
1 parent c623968 commit 5c03b87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions netlify_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ CI=false

mkdir -p src

mkdir -p app/drop-lookup
curl -L -o src/drop-lookup.tar.gz https://github.com/atlasacademy/drop-lookup/archive/master.tar.gz
tar -C app/drop-lookup --strip-components=2 -zxvf src/drop-lookup.tar.gz drop-lookup-master/dist
# drop-lookup is hosted on Github Pages
# mkdir -p app/drop-lookup
# curl -L -o src/fgo-lookup.tar.gz https://github.com/atlasacademy/fgo-lookup/archive/master.tar.gz
# tar -C app/drop-lookup --strip-components=2 -zxvf src/fgo-lookup.tar.gz fgo-lookup-master/dist

mkdir -p app/bingo
curl -L -o src/bingo.tar.gz https://github.com/atlasacademy/bingo/archive/master.tar.gz
Expand Down
4 changes: 3 additions & 1 deletion packages/db-og-worker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ const worker = {
return fetch(url.href, { cf: { cacheTtl: 0 } });
} else if (pathname.startsWith("/db")) {
return await handleDBEvent(event, env);
} else if (pathname.startsWith("/chargers") || pathname.startsWith("/fgo-docs/")) {
} else if (
["chargers", "fgo-docs/", "drop-lookup/"].some((basePath) => pathname.startsWith(`/${basePath}`))
) {
url.hostname = "atlasacademy.github.io";
if (pathname === "/chargers") {
url.pathname = "/chargers/";
Expand Down

0 comments on commit 5c03b87

Please sign in to comment.