Portainer - Unable to retrieve endpoints

I can reproduce this issue. As soon as an auth middleware is enabled portainer fails. Did you open an issue on portainer or traefik?

The issue is explained here, without a solution: https://github.com/portainer/portainer/issues/1629
Also setting this to true does not help: https://docs.traefik.io/middlewares/basicauth/#removeheader