diff options
author | 2024-09-15 01:23:39 +0200 | |
---|---|---|
committer | 2024-09-15 01:23:39 +0200 | |
commit | fbea61e3a9f96453bc0d323c0f689b433a7b1a38 (patch) | |
tree | 0b7dd7bf3da15220a7a802146428edb2a497b863 /main.go | |
parent | fix(cgit): configure assets directory (diff) | |
download | cgit-httpd-fbea61e3a9f96453bc0d323c0f689b433a7b1a38.tar.xz |
To support the "smart HTTP protocol" the git handler needs to be added
to the mux before the cgit handler. This was previously fixed in 2022,
but a bad rebase lost the change.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -41,6 +41,15 @@ func main() { gitMux := mux.NewRouter() + git.New(git.Options{ + CGI: cfg.Git.CGI, + ReposRoot: cfg.ReposRoot, + ExportAll: cfg.Git.ExportAll, + Logger: logger.With("handler", "git"), + }). + WithRegister(RegistererFunc(gitMux.Handle)). + Build() + cgit.New(cgit.Options{ CGI: cfg.CGit.CGI, ReposRoot: cfg.ReposRoot, @@ -51,15 +60,6 @@ func main() { WithRegister(RegistererFunc(gitMux.Handle)). Build() - git.New(git.Options{ - CGI: cfg.Git.CGI, - ReposRoot: cfg.ReposRoot, - ExportAll: cfg.Git.ExportAll, - Logger: logger.With("handler", "git"), - }). - WithRegister(RegistererFunc(gitMux.Handle)). - Build() - m := manager.New() m.Add(&server.Server{ Name: "git", |