mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 11:12:35 +02:00
Gitea/Forgejo served under a ROOT_URL path prefix (e.g. https://host/gitea) place repos at /<prefix>/owner/repo. The Gitea backend assumed a host-root layout: parse_repo_url required exactly two path segments (so subpath URLs raised "Cannot parse repository URL") and get_api_base dropped the prefix, yielding https://host/api/v1 instead of https://host/gitea/api/v1. Treat the final two path segments as owner/repo and keep leading segments as a base-path prefix; derive the API base as {scheme}://{host}{prefix}/api/v1. Root-hosted instances are unaffected. Forgejo inherits the fix; GitHub/GitLab are untouched.