forked from Gitlink/gitea-1120-rc1
LFS: Return 404 for unimplemented endpoints (#1330)
Without this patch a 401 is returned for unspecified endpoints, making the LFS client ask for HTTP credentials. This behaviour was introduced with the new locking API: https://github.com/git-lfs/git-lfs/blob/master/docs/api/locking.md
This commit is contained in:
parent
9182a35f18
commit
5586445207
|
@ -639,6 +639,9 @@ func runWeb(ctx *cli.Context) error {
|
|||
m.Get("/objects/:oid/:filename", lfs.ObjectOidHandler)
|
||||
m.Any("/objects/:oid", lfs.ObjectOidHandler)
|
||||
m.Post("/objects", lfs.PostHandler)
|
||||
m.Any("/*", func(ctx *context.Context) {
|
||||
ctx.Handle(404, "", nil)
|
||||
})
|
||||
}, ignSignInAndCsrf)
|
||||
m.Any("/*", ignSignInAndCsrf, repo.HTTP)
|
||||
m.Head("/tasks/trigger", repo.TriggerTask)
|
||||
|
|
Loading…
Reference in New Issue