use decrementing amount of redirects
This makes `redirects` contain the number of remaining redirects, which makes it easier to limit the number of further redirects that should be allowed.
This commit is contained in:
parent
e2311a6f4b
commit
7e37a8fd88
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ export async function signedGet(_url: string, user: { id: User['id'] }): Promise
|
|||
let url = _url;
|
||||
const keypair = await getUserKeypair(user.id);
|
||||
|
||||
for (let redirects = 0; redirects < 3; redirects++) {
|
||||
for (let redirects = 3; redirects > 0; redirects--) {
|
||||
const req = createSignedGet({
|
||||
key: {
|
||||
privateKeyPem: keypair.privateKey,
|
||||
|
|
Loading…
Reference in a new issue