Drone adding wrong webhook url to GItea

I run Drone (and agent) and Gitea under docker containers which are reverse proxy’d by NGINX such that I can access https://git.mydomain.com and https://drone.mydomain.com. My Drone environment looks like this:

      - DRONE_OPEN=true
      - DRONE_HOST=https://drone.mydomain.com
      - DRONE_GITEA=true
      - DRONE_GITEA_URL=https://git.mydomain.com
      - DRONE_SECRET=mysecret

However, Drone adds the webhook to my Gitea repo as:
Anyone know why this happens / how I could fix it?

You need to set X-Forwarded-For and X-Forwarded-Proto when running Drone behind a reverse proxy so that Drone can ascertain its address form the incoming HTTP request. We provide sample nginx, apache and caddy configurations that you can reference in our docs: http://docs.drone.io/setup-with-nginx/

See also: Payload URL generation of webhooks ignores DRONE_HOST