Mentioned in: https://github.com/go-gitea/gitea/pull/27931#issuecomment-1798016960 Same to #25131, so use the same method to fix this problem.