Webhook of production showing port on https

I have a problem with Webhook node.
On test mode the URL is ok: https://mydomain.com/webhook-test/xxxx
But in production the URL show the port: https://mydomain.com:5678/webhook/xxxx

I running n8n on docker with ngix

services:
  n8n:
    image: n8nio/n8n:latest
    container_name: n8n
    restart: always
    ports:
      - "5678:5678"

    environment:
      - N8N_BASIC_AUTH_ACTIVE=true
      - N8N_BASIC_AUTH_USER=[my-user]
      - N8N_BASIC_AUTH_PASSWORD=[my key]
      - N8N_HOST=mydomain.com
      - N8N_PROTOCOL=https
      - N8N_PORT=5678
      - N8N_EDITOR_BASE_URL=https://mydomain.com/
      - N8N_WEBHOOK_URL=https://mydomain.com/
      - N8N_RUNNERS_ENABLED=true
      - TZ=America/Sao_Paulo
      - N8N_PUSH_BACKEND=websocket
      - N8N_RUNNERS_ENABLED=true
    volumes:
      - n8n_data:/home/node/.n8n
    networks:
      - proxy

  certbot:
    image: certbot/certbot
    container_name: certbot
    restart: unless-stopped
    volumes:
      - certs:/etc/letsencrypt
      - certs-data:/data/letsencrypt
      - ./nginx/conf.d:/etc/nginx/conf.d
    entrypoint: "/bin/sh -c 'trap exit TERM; while :; do sleep 6h & wait $${!}; certbot renew; done'"

volumes:
  n8n_data:
  certs:
  certs-data:

networks:
  proxy:
    driver: bridge
server {
    listen 80;
    server_name mydomain.com;

    # Redireciona HTTP -> HTTPS
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name mydomain.com;

    # Certificados SSL (Certbot vai preencher automaticamente)
    ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    # Proxy para o container n8n
    location / {
        proxy_pass http://127.0.0.1:5678;  # Porta interna do n8n
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    # Segurança (headers básicos)
    add_header X-Frame-Options SAMEORIGIN;
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    add_header Referrer-Policy no-referrer-when-downgrade;
}

Hi there, have you tried restarting it, i have this issue a while back and after changing all the necessarry variable and restarting it, the issue is solved

also, maybe the issue is only on the display, as in if you hit the prod url,it will still be without the :5678 and if it;s like that, then the issue is only on the display

also u might want to delete the last slash from the url so instead of this
- N8N_EDITOR_BASE_URL=https://mydomain.com/
- N8N_WEBHOOK_URL=https://mydomain.com/

you make it like this
- N8N_EDITOR_BASE_URL=https://mydomain.com
- N8N_WEBHOOK_URL=https://mydomain.com

Thanks! Its just display the port!