feat(forge): show inline images on GitLab #149
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/143-gitlab-images"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #143 (parent #137)
Summary
Images uploaded to GitLab MRs and issues now draw inline in the Details pane, on public and private projects, as on Forgejo. Images that fail to load or live on another host stay the
🖼 altlink. The GitLab token never leaves the GitLab host on any request.Decisions
/uploads/<secret>/<file>links against the host root, losing the project. New optional, I/O-freeforge.AssetResolverlets an adapter resolve a body link for its repo before core's default; core still applies its credential refusal and same-origin gate to the result. The GitLab resolver handles only the two upload forms; every other link takes core's path.OpenAssetrewrites an on-origin upload URL toGET /api/v4/projects/:id/uploads/:secret/:filename(GitLab 17.4+; older servers 404, so the link stays) and refuses off-origin URLs before any request. Links with.,..or empty secret/filename segments are refused, so a body someone else wrote can't steer an authenticated request elsewhere on the host.PRIVATE-TOKENon every redirect hop, including to other hosts. The adapter's HTTP client now dropsPRIVATE-TOKENandAuthorizationon any hop off the GitLab origin, for every call (API, job logs, images), replacing #139's job-log-only guard. Recorded in ADR 0018.Test plan
go test -race ./...: 15/15 packages ok. Build, govulncheck, install-test and windows vet/build pass.🤖 Generated with Claude Code