Changeset 429d3b0 in Klonkt for scripts


Ignore:
Timestamp:
06/26/2026 09:21:31 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
1968592
Parents:
8ef8c3e
Message:

fix(migrate-circles): resolve relative 302 Location to an absolute actor URL

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/migrate-circles.mjs

    r8ef8c3e r429d3b0  
    1313  try {
    1414    const r = await fetch(siteUrl, { headers: { Accept: 'application/activity+json' }, redirect: 'manual' });
    15     if (r.status >= 300 && r.status < 400) { const loc = r.headers.get('location'); if (loc) return loc; }
     15    if (r.status >= 300 && r.status < 400) { const loc = r.headers.get('location'); if (loc) return new URL(loc, siteUrl).href; }
    1616    if (r.ok) return siteUrl; // root already serves the actor
    1717  } catch (e) { /* unreachable */ }
Note: See TracChangeset for help on using the changeset viewer.