How to add wildcard subdomains for single container?

Hey,

I am running a code-server in container and it proxies ports [port].domain.tld i.e. 3000.domain.com
I am running my container in subdomain code.domail.tld, so I would like to have ssl on ports 3000.code.domail.tld . I can access the content but SSL is not working.

I added tls subdomains for this particular container. Have I misconfigured something?

version: '3.9'

services:
  code-server:
    image: linuxserver/code-server
    container_name: code-server
    restart: unless-stopped
    privileged: true
    environment:
      - PUID=0
      - PGID=0
      - TZ=Europe/Vilnius
      - PASSWORD=password #optional
      #- HASHED_PASSWORD= #optional
      - SUDO_PASSWORD=password0 #optional
      #- SUDO_PASSWORD_HASH= #optional
      - PROXY_DOMAIN=code.domain.com #optional
      - DEFAULT_WORKSPACE=/workspace #optional
    volumes:
      - ./config:/config
      - ./workspace:/workspace
    networks:
      - proxy
    labels:
      - 'traefik.enable=true'
      - 'traefik.http.routers.code.rule=Host(`code.domain.com`) || HostRegexp(`{subdomain:[a-z0-9]+}.code.domain.com`)'
      - 'traefik.http.routers.code.tls.domains[0].main=code.domain.com'
      - 'traefik.http.routers.code.tls.domains[0].sans=*.code.domain.com'
      - 'traefik.http.routers.code.entrypoints=https'
      - 'traefik.http.routers.code.tls.certresolver=letsencrypt'
      - 'traefik.http.routers.code.service=code-service'
      - 'traefik.http.services.code-service.loadbalancer.server.port=8443'

networks:
  proxy:
    name: proxy