This reverts commit e5cd80e0219f10818f43e8cab6b9c814cb1cd796. Fixes: https://github.com/go-gitea/gitea/issues/6064