Alway redirected on traefik dashboard ui

What ever url I use I'm redirected to the traefik dashboard even if url doesn't match with the IngressRoute of the dashboard;
the content of the IngressRoute:

  apiVersion: traefik.containo.us/v1alpha1
  kind: IngressRoute
  metadata:
    name: traefik
    namespace: traefik
  spec:
    entryPoints:
    - web
    routes:
    - match: Host(`traefik-ui.mydomain.com`) && PathPrefix(`/`)
      kind: Rule
      priority: 1
      services:
      - name: api@internal
        kind: TraefikService

When I use by example this url: https://prometheus.mydomain.com/
I receive 301 Moved Permanently response and
I'm directly redirected to http://prometheus.mydomain.com/dashboard
and if I replace http by https : https://prometheus.mydomain.com/dashboard
I can see the traefik dashboardui instead of prometheus server
Pi: I configure Traefik 2.1 as a daemonset
with this traefik.toml file:

      [global]
        checkNewVersion = true
        sendAnonymousUsage = true

      [log]
        level = "DEBUG"

      [api]
        dashboard = true
        insecure = true
      [providers]
         [providers.kubernetesingress]
         [providers.kubernetescrd]
      [entrypoints]
        [entrypoints.web]
          address = ":80"
          [entryPoints.web.proxyProtocol]
             insecure = true
          [entryPoints.web.forwardedHeaders]
             insecure = true
        [entrypoints.https]
          address = ":443"

      [ping]

      [accesslog]

      [metrics]
        [metrics.prometheus]
           entryPoint = "traefik"
           buckets=[0.1,0.3,1.2,5.0]

If somebody has any idea how to debug it and what should I check...thanks by advance

Hello,

You have to set insecure = false

https://docs.traefik.io/v2.1/operations/dashboard/#secure-mode

put in insecure mode redirect all traffic to /dashboard ? if it is the case, it should be a bug.

no it's the inverse: insecure=false -> enable secure mode

yes but as I said
the insecure=false enable secure mode
the insecure= true disable secure mode and redirect all traffik to /dashboard, it should be a bug.
so on the insecure mode is not usuable

Traefik don't do that.

  1. to use api@internal your have to be the secure mode.
  2. the insecure mode is mainly for testing purpose, never use that in production
  3. When the insecure mode is enable, the dashboard is enabled on the port 8080, so it don't capture requests from the other ports.