20 lines
885 B
Diff
20 lines
885 B
Diff
--- 9.0.3 2024-12-12 08:06:13.000000000 +0100
|
|
+++ aneksajo 2024-12-16 08:23:15.000000000 +0100
|
|
@@ -61,6 +61,17 @@
|
|
return archivePathRe.MatchString(req.URL.Path)
|
|
}
|
|
|
|
+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
|
|
+}
|
|
+
|
|
// handleSignIn clears existing session variables and stores new ones for the specified user object
|
|
func handleSignIn(resp http.ResponseWriter, req *http.Request, sess SessionStore, user *user_model.User) {
|
|
// We need to regenerate the session...
|