The same rule from v2 does not work in v3

The following label works for v2 but it doesn't work for v2:

  • "traefik.http.routers.apache-${PROJECT_NAME}-api.rule=((Host(${D_HOST}) || Host(${D_HOST_2})) && (PathPrefix(/api) || PathPrefix(/json)))"

I get:

error while adding rule Host: unexpected number of parameters; got 2, expected one of [1]

I tried with it but it doesn't work:

  - "traefik.http.routers.apache-${PROJECT_NAME}-api.rule=Host(`${D_HOST}`)"
  - "traefik.http.routers.apache-${PROJECT_NAME}-api.rule=Host(`${D_HOST_2}`)"
  - "traefik.http.routers.apache-${COMPOSE_PROJECT_NAME}-api.rule=PathPrefix(`/api`)"
  - "traefik.http.routers.apache-${COMPOSE_PROJECT_NAME}-api.rule=PathPrefix(`/json`)"

The error usually happens when moving to Traefik v3 while using something like Host(`a`,`b`).