I'm trying to get basic auth working. I got it to prompt me for the auth, but its not accepting my password.
Heres my config
When trying to login, it just logs
time="2022-10-05T18:23:43Z" level=debug msg="Authentication failed" middlewareName=auth@docker middlewareType=BasicAuth
We use different structure in our
docker-compose.yml, note "-", "="
Make sure to have a hashed password and in
docker-compose.yml every single $ is escaped to $$.
Do not put a space before username. Maybe username " shorty" works?
Hey thanks for the reply. Yeah, I use that syntax in my file. I just used docker compose convert becasue I'm loading from ENV varibles so you could see how it is. The actual compose file looks like this
# The official v2 Traefik docker image
# Enables the web UI and tells Traefik to listen to docker
# So that Traefik can listen to the Docker events
# TODO: Don't bind the full docker sock
- type: bind
Note no space before the name. I've not escaped the $'s in my .env file, but docker compose seems to be doing it fine, and it seesm traefik got it fine, from the debug logs.
Thanks for your help
Ok i figured it out. Apparently .env files in docker will convert $'s if and only if they have capital letters after them. As such most of my dollar signs were working, except for one, and escaping would be needed on just one. I was able to avoid this by wrapping my thing in single quotes.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.