Homeassist local proxy using external config

Home assistant will not work using traefiks external config. It looks like this.

http:
 #region routers
  routers:
    homeassistant:
      # For Homeassistant config, check: https://www.home-assistant.io/integrations/http/#reverse-proxies
      # This relies on Homeassistant using http. No certs are needed in the Homeassistant config.
      entryPoints:
        - "https"
      rule: "Host(`homeassistant.domain`)"
      middlewares:
        - default-headers
        - https-redirectscheme
      tls: {}
      service: homeassistant
#endregion
#region services
  services:
    homeassistant:
      loadBalancer:
        servers:
          - url: "http://IP:8123"
        passHostHeader: true
#endregion
    default-headers:
      headers:
        frameDeny: true
        browserXssFilter: true
        contentTypeNosniff: true
        forceSTSHeader: true
        stsIncludeSubdomains: true
        stsPreload: true
        stsSeconds: 15552000
        customFrameOptionsValue: SAMEORIGIN
        customRequestHeaders:
          X-Forwarded-Proto: https



    default-whitelist:
      ipAllowList:
        sourceRange:
        - "10.0.0.0/8"
        - "192.168.0.0/16"
        - "172.16.0.0/12"

    secured:
      chain:
        middlewares:
        - default-whitelist
        - default-headers

Imagine yourself going to the doctor and saying “I don’t feel good”.
What do you think his first question will be? I bet for “What are your symptoms”…

Sorry was pretty tired when i made that. Trying to give home assistant a cloudflare’s https certs with traefik using docker containers. The raefik setup is working with serveral other domains like pihole, nextcloud and vault warden but wont work with home assistant. Home assistant is running in proxmox on a virtual machine with the HAOS image. When I try to access the domain I get an unable to connect message.