Hi,
I noticed a small issue while deploying the latest version with BASIC_AUTH enabled.
Steps to reproduce
- Deploy the container with:
BASIC_AUTH=username:password
- Start the container.
- Wait for the Docker healthcheck to run.
Expected behavior
The container should remain healthy.
Actual behavior
The Docker healthcheck starts failing because /health returns 401 Unauthorized.
Container logs show messages similar to:
127.0.0.1:xxxxx - "GET /health HTTP/1.1" 401 Unauthorized
As a result, Docker marks the container as unhealthy.
Root cause
The BASIC_AUTH middleware currently protects all endpoints, including /health.
However, the Dockerfile already defines /health as the container healthcheck endpoint:
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3
CMD curl -f http://localhost:8000/health || exit 1
Since the healthcheck does not send authentication headers, it always receives 401 Unauthorized once BASIC_AUTH is enabled.
Possible solution
Exclude /health from the authentication middleware so Docker healthchecks continue to work while all functional API endpoints remain protected.
Hi,
I noticed a small issue while deploying the latest version with BASIC_AUTH enabled.
Steps to reproduce
BASIC_AUTH=username:password
Expected behavior
The container should remain healthy.
Actual behavior
The Docker healthcheck starts failing because /health returns 401 Unauthorized.
Container logs show messages similar to:
127.0.0.1:xxxxx - "GET /health HTTP/1.1" 401 Unauthorized
As a result, Docker marks the container as unhealthy.
Root cause
The BASIC_AUTH middleware currently protects all endpoints, including /health.
However, the Dockerfile already defines /health as the container healthcheck endpoint:
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3
CMD curl -f http://localhost:8000/health || exit 1
Since the healthcheck does not send authentication headers, it always receives 401 Unauthorized once BASIC_AUTH is enabled.
Possible solution
Exclude /health from the authentication middleware so Docker healthchecks continue to work while all functional API endpoints remain protected.