add support for disabling git clone proxying
このコミットが含まれているのは:
コミット
30a0fd5b41
|
@ -142,8 +142,13 @@ func Serve(port string) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
app.Post("/:user/:repo/git-upload-pack", func(c *fiber.Ctx) error {
|
app.Post("/:user/:repo/git-upload-pack", func(c *fiber.Ctx) error {
|
||||||
utils.ProxyRequest(c, "https://github.com/"+c.Params("user")+"/"+c.Params("repo")+".git/git-upload-pack")
|
if proxying == "true" {
|
||||||
return nil
|
utils.ProxyRequest(c, "https://github.com/"+c.Params("user")+"/"+c.Params("repo")+".git/git-upload-pack")
|
||||||
|
return nil
|
||||||
|
} else {
|
||||||
|
c.Redirect("https://github.com/" + c.Params("user") + "/" + c.Params("repo") + ".git/git-upload-pack")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
})
|
})
|
||||||
app.Get("/:user/:repo/blob/:branch/+", pages.FileView)
|
app.Get("/:user/:repo/blob/:branch/+", pages.FileView)
|
||||||
app.Get("/:user/:repo/tree/:branch/+", pages.DirView)
|
app.Get("/:user/:repo/tree/:branch/+", pages.DirView)
|
||||||
|
|
読み込み中…
新しいイシューから参照