Skip to content

Commit a42481f

Browse files
committed
Don't follow redirects
1 parent 504d240 commit a42481f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

public/scripts/workflow.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ async function detectDefaultBranch(repoInfo, timeoutMs = 3000) {
6565
function fetchWithTimeout(url, timeoutMs) {
6666
const controller = new AbortController();
6767
const timeout = setTimeout(() => controller.abort(), timeoutMs);
68-
return fetch(url, { method: "HEAD", signal: controller.signal }).finally(
69-
() => clearTimeout(timeout),
70-
);
68+
return fetch(url, {
69+
method: "HEAD",
70+
signal: controller.signal,
71+
redirect: "manual",
72+
}).finally(() => clearTimeout(timeout));
7173
}
7274

7375
const checks = branches.map((branch) => {

0 commit comments

Comments
 (0)