docker – IP authorization of Traefik proxy

I have a traefik in docker-dial:

    version: & # 39; 3 & # 39;
networks:
Proxy:
driver: bridge
services:
traefik:
container name: traefik
image: traefik: v1.7.9
command: --api --docker
ports:
- "80:80"
- "443: 443"
- "8080: 8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/etc/traefik/traefik.toml
- ./acme.json:/acme.json
networks:
- Power of attorney

Also have nginx under mydomain.com, and I want to allow only my IP address to connect to it:

nginx:
build: ./nginx
networks:
- backend
- traefik_proxy
restart: always
tags:
traefik.enable: "true"
traefik.port: "80"
traefik.frontend.headers.allowedHosts: "1.2.3.4" # MyIp
traefik.frontend.rule: "Host: mysite.com, www.mysite.com"

When I access mysite.com, I receive an incorrect host error and the IP address in the headers is the IP address of my server and not that of my IP address real.
P.S Docker in swarm mode, but nginx and traefik build using local docker-compound