Backport #27231 #27259 manually --------- Co-authored-by: delvh <dev.lh@web.de>
A bit more performant when we only use it for appending strings.
These can be used to explain which types of repositories a Gitea instance is willing to host, or other rules for creating repositories.