Safari Can't Find Server using docker compose

I'm attempting to use Traefik for local development, however when I setup the following docker compose file:

    image: "traefik:v2.11"
    container_name: "traefik"
      - "--log.level=DEBUG"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entryPoints.web.address=:80"
      - "80:80"
      - "8080:8080"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

    image: "traefik/whoami"
    container_name: "simple-service"
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
      - "traefik.http.routers.whoami.entrypoints=web"

It does seem to load the content correctly in every browser (Chrome, Firefox, Edge, even Postman). However for some reason if I attempt to GET http://whoami.localhost using Safari, I receive "Safari Can't Find Server". I'm not sure if this is due to lack of some additional setup necessary for it to work in Safari, but I couldn't find any info about this issue anywhere. Traefik's logs in debug mode don't help me much either since the request never seems to make it to a point where Traefik receives the request at all

Maybe Safari doesn’t like whoami.localhost (for whatever reason some hardcoded logic for localhost?), try to use something different like whoami.local.

Of course I assume you created the necessary entries in local DNS or hosts file.

This is where it gets confusing for me, if I have to alter the hosts file, shouldn't this also be needed for every other browser? I've already tried to replace localhost with local, but the result doesn't change much, the request just never returns anything, and there is no network log in Safari either

It seems *.localhost may always be resolved to

Related post about curl via Docker forum.