HAProxy Proxy-Protocol Support / Internal Server Error Decoding Failed

Hello,

I tried setting up Gitea behind a HAProxy. The HAProxy is making the encryption, so that every communication behind it, is without encryption.

The problem is now, that I want to use the proxy-protocol v1 so that I can see for example the original client IP.

Accessing the webinterface works normal, but when trying to push something from CLI or creating a file via the webinterface the following error appears:

error: Internal Server Error Decoding Failed

Unfortunately there is no more information in the journal. When completely removing the proxy protocol and switching back to X-Forward everything works flawless.

The config files look like this:

/etc/gitea/app.ini

[server]
SSH_DOMAIN = gitea.tld
DOMAIN = gitea.tld
HTTP_PORT = 3000
ROOT_URL = https://gitea.tld/
APP_DATA_PATH = /var/lib/gitea/data
DISABLE_SSH = true
LFS_START_SERVER = true
LFS_JWT_SECRET = <KEY>
OFFLINE_MODE = true
USE_PROXY_PROTOCOL = true

[security]
INSTALL_LOCK = true
INTERNAL_TOKEN = <KEY>
PASSWORD_HASH_ALGO = pbkdf2

haproxy.cfg

backend gitea
        mode http
        server gitea 10.0.0.12:3000 send-proxy check

frontend web
        mode http
        # Redirect to SSL
        http-request redirect scheme https code 301 if !{ ssl_fc } 

        # Set X-Fordwarded-Proto when using SSL
        http-request add-header X-Forwarded-Proto https if { ssl_fc }

        # Remove Server header
                
        # gitea
        use_backend gitea if { hdr(Host) -i gitea.tld }

Is there a configuration issue or is it a general problem of gitea? During installation I followed the documentation on docs.gitea.com/administration/reverse-proxies

Thanks in advance!