Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health check problem with MAILDEV_BASE_PATHNAME, MAILDEV_WEB_USER and MAILDEV_WEB_PASS #474

Open
nicolasiannarilli opened this issue Oct 24, 2023 · 1 comment · May be fixed by #475
Open

Comments

@nicolasiannarilli
Copy link

nicolasiannarilli commented Oct 24, 2023

Health check needs basic auth when MAILDEV_BASE_PATHNAME, MAILDEV_WEB_USER and MAILDEV_WEB_PASS are active.

I think the problem is in auths.js :

 // allow health checks without auth
    if (req.path === '/healthz') {
      return next()
    }

doesn't works with MAILDEV_BASE_PATHNAME.

to reproduce :
with docker-compose.yml

maildev:
    image: maildev/maildev:latest # latest = 2.1.0
    container_name: maildev
    environment:
      MAILDEV_BASE_PATHNAME: "/mail"
      MAILDEV_WEB_USER: "maildev"
      MAILDEV_WEB_PASS: "maildev"
    ports:
      - "1080:80"
      # - "1025:25"

command :

docker-compose up -d maildev
docker-compose exec maildev wget -O - http://localhost:1080/mail/healthz

result :

wget: server returned error: HTTP/1.1 401 Unauthorized
@rpost
Copy link

rpost commented Feb 27, 2024

Any info when can this be resolved? I'm also affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants