1. Caddy version (
docker latest v2 alpine Docker Hub
2. How I run Caddy:
a. System environment:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Client: Docker Engine - Community
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 24 01:48:02 2022
Server: Docker Engine - Community
API version: 1.41 (minimum version 1.12)
Go version: go1.16.15
Git commit: 87a90dc
Built: Thu Mar 24 01:45:53 2022
see next section for docker command
c. Service/unit/compose file:
docker run -d --name caddy -v /etc/Caddyfile:/etc/caddy/Caddyfile -v /etc/caddy:/root/.local/share/caddy --net host --restart on-failure caddy/caddy:alpine
d. My complete Caddyfile or JSON config:
3. The problem I’m having:
I’m having an issue with the basicauth to my internal service. For some reason there is a login prompt loop that occurs.
tested on: on mobile (haven’t seemed to experience the issue on PC) iPhone chrome browser and safari tested. Latest app versions and iOS. On chrome and safari, it log me in to my service but then when I click around on the website, it prompts me to login again, however I can hit cancel or I can enter the login username/pass and gain access again.
4. Error messages and/or full log output:
no errors in the logs.
5. What I already tried:
I’ve tried searching google, which the auto fill shows that people are searching for this same problem - but no relevant forum posts show up in the results.
I tried looking at caddy logs but literally nothing shows up there.
I think I’m setting up the basicauth correctly based on various examples I’ve found.
6. Links to relevant resources:
Has the internal service you are proxying to its own login form?
Perhaps the internal service is interfering with the basic auth’s
But that wouldn’t explain why you don’t seem to experience the issue on PC.
Is your internal service some public software, so you can share its name/link, or is it something private?
The internal service has its own auth built in which I am not utilizing and have never enabled. I didn’t enable it due to the fact that I considered just using caddy’s basicauth.
It’s a custom private service that our engineers wrote. If there’s something specific you’d like me to ask them details on I can find out.
I disabled caddy basic auth and reverted to setting up the internal apps built in auth. It works but I was hoping to just be able to quickly utilize caddy’s basicauth.
I hadn’t much spare time yesterday, but glad to hear you found a solution that works for you
Though I had lowkey hoped that it was just some open source service or so where I could just skim through the source code
It could have been a side effect of the framework/tech stack used and whatnot.
So it would have been a full questionary for your engineers
PS: I went ahead and marked your latest post as solution . Unless you want to replace the services’ auth with basicauth again
Try testing auth with
curl -v to see what HTTP headers you’re getting back when auth is incorrect, and when auth is correct.
I spent too much time setting up the apps internal auth and don’t want to spend more time to mess around with the caddy auth now that the other one is setup. If I try caddy auth with other services and have the issue I’ll post another post but i’ll remember to try this first thanks.
This topic was automatically closed after 30 days. New replies are no longer allowed.