Skip to content

Commit

Permalink
follow redirect (close AlistGo/alist#4996)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Aug 12, 2023
1 parent 36da47c commit c6917fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
cp -r ../cf-workers-proxy/dist/index.js ./alist-proxy.js
git add .
git config --local user.email "[email protected]"
git config --local user.name "Noah Hsu"
git config --local user.name "Andy Hsu"
git commit --allow-empty -m "auto update alist-proxy.js" -a
cd ..
- name: Upload dist files
Expand Down
2 changes: 1 addition & 1 deletion src/handleDownload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function handleDownload(request: Request) {
if (res.code !== 200) {
return new Response(JSON.stringify(res));
}
request = new Request(res.data.url, request);
request = new Request(res.data.url, { ...request, redirect: "follow" });
if (res.data.header) {
for (const k in res.data.header) {
for (const v of res.data.header[k]) {
Expand Down

0 comments on commit c6917fa

Please sign in to comment.