fix: a loop through the site's absolute URL lists each address once

The loop and chain path of a redirect notice appended the final target
when it was an absolute URL of the site itself, so a loop read
"/a → /b → /a → https://example.test/a". The site URL now counts as
internal, as it does when the chain is followed.
This commit is contained in:
2026-10-27 13:15:36 +01:00
parent e957c00866
commit 79567b3e18
2 changed files with 9 additions and 7 deletions

View File

@@ -170,7 +170,7 @@ func (s *Service) Issues(ctx context.Context) ([]Issue, error) {
continue
}
out = append(out, Issue{Kind: IssueRedirectChain, URL: r.Source, Tool: toolUpdateRedirect, Details: map[string]any{
"redirect_id": r.ID, "hops": len(ch.Hops), "final": displayURL(site, ch.Final), "path": displayPath(r, ch),
"redirect_id": r.ID, "hops": len(ch.Hops), "final": displayURL(site, ch.Final), "path": displayPath(site, r, ch),
}})
}