Skip to content

Commit f4bbf12

Browse files
committed
fix(forgejo): use a string base when parsing redirects
1 parent 5910ab1 commit f4bbf12

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/source-control-forgejo/src/server/forgejoMediaFetch.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const make = Effect.gen(function* () {
3939
const location = response.headers.location;
4040
if (response.status < 300 || response.status >= 400) return response;
4141
if (!location || hop >= MAX_REDIRECTS) return null;
42-
const next = URL.parse(location, target);
42+
const next = URL.parse(location, target.href);
4343
if (!next || next.origin !== server.origin || next.username || next.password) return null;
4444
target = next;
4545
}

0 commit comments

Comments
 (0)