File tree Expand file tree Collapse file tree 2 files changed +1
-11
lines changed Expand file tree Collapse file tree 2 files changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -1113,7 +1113,7 @@ func RegisterRoutes(m *web.Route) {
1113
1113
m .Post ("/" , lfs .PostLockHandler )
1114
1114
m .Post ("/verify" , lfs .VerifyLockHandler )
1115
1115
m .Post ("/{lid}/unlock" , lfs .UnLockHandler )
1116
- })
1116
+ }, lfs . CheckAcceptMediaType )
1117
1117
m .Any ("/*" , func (ctx * context.Context ) {
1118
1118
ctx .NotFound ("" , nil )
1119
1119
})
Original file line number Diff line number Diff line change @@ -21,16 +21,6 @@ import (
21
21
22
22
//checkIsValidRequest check if it a valid request in case of bad request it write the response to ctx.
23
23
func checkIsValidRequest (ctx * context.Context ) bool {
24
- if ! setting .LFS .StartServer {
25
- log .Debug ("Attempt to access LFS server but LFS server is disabled" )
26
- writeStatus (ctx , http .StatusNotFound )
27
- return false
28
- }
29
- if ! isValidAccept (ctx .Req ) {
30
- log .Info ("Attempt access LOCKs without accepting the correct media type: %s" , lfs_module .MediaType )
31
- writeStatus (ctx , http .StatusBadRequest )
32
- return false
33
- }
34
24
if ! ctx .IsSigned {
35
25
user , _ , _ , err := parseToken (ctx .Req .Header .Get ("Authorization" ))
36
26
if err != nil {
You can’t perform that action at this time.
0 commit comments