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:
@@ -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),
|
||||
}})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user