diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-04-26 02:35:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 14:35:50 -0400 |
commit | 9219534447411f6ffe507fee64f89c619c29d501 (patch) | |
tree | dd13f30bd24b28f69ea939bbe0de14aa2767e5d5 /routers/web/web.go | |
parent | d5e93413bcd7d34af4371136bb6d97c7eb393123 (diff) | |
download | gitea-9219534447411f6ffe507fee64f89c619c29d501.tar.gz gitea-9219534447411f6ffe507fee64f89c619c29d501.zip |
Fix incorrect CORS response in Http Git handler (#24303)
Use the general `cors.Handler` for CORS
Diffstat (limited to 'routers/web/web.go')
-rw-r--r-- | routers/web/web.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/web.go b/routers/web/web.go index 9d1bd90d93..af39059325 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -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 ***** |