1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Fix incorrect CORS response in Http Git handler (#24303)

Use the general `cors.Handler` for CORS
This commit is contained in:
wxiaoguang
2023-04-26 02:35:50 +08:00
committed by GitHub
parent d5e93413bc
commit 9219534447
2 changed files with 22 additions and 34 deletions

View File

@ -1515,7 +1515,7 @@ func RegisterRoutes(m *web.Route) {
m.GetOptions("/objects/{head:[0-9a-f]{2}}/{hash:[0-9a-f]{38}}", repo.GetLooseObject)
m.GetOptions("/objects/pack/pack-{file:[0-9a-f]{40}}.pack", repo.GetPackFile)
m.GetOptions("/objects/pack/pack-{file:[0-9a-f]{40}}.idx", repo.GetIdxFile)
}, ignSignInAndCsrf, context_service.UserAssignmentWeb())
}, ignSignInAndCsrf, repo.HTTPGitEnabledHandler, repo.CorsHandler(), context_service.UserAssignmentWeb())
})
})
// ***** END: Repository *****