forgejo-aneksajo_auto_patch.../data/48/ref_aneksajo.diff
2025-01-23 01:26:39 +01:00

12 lines
486 B
Diff

63a64,74
> var annexPathRe = regexp.MustCompile(`^(/git-annex-p2phttp/|/[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+/annex/)`)
>
> func isAnnexPath(req *http.Request) bool {
> if setting.Annex.Enabled {
> // "/config" is git's config, not specifically git-annex's; but the only current
> // user of it is when git-annex downloads the annex.uuid during 'git annex init'.
> return strings.HasSuffix(req.URL.Path, "/config") || annexPathRe.MatchString(req.URL.Path)
> }
> return false
> }
>