Caddy basic auth + handle path

1. Output of caddy version:

v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=

2. How I run Caddy:

handle /hello {
	basicauth * {
		Bob JDJhJDEwJEVCNmdaNEg2Ti5iejRMYkF3MFZhZ3VtV3E1SzBWZEZ5Q3VWc0tzOEJwZE9TaFlZdEVkZDhX
	}
	reverse_proxy * {
		to ip:port
		transport http {
			read_buffer 8192
		}
		header_up X-Forwarded-Host {hostport}
	}
}

a. System environment:

Linux container

b. Command:

./caddy run

3. What I already tried:

i have some problems with caddy basic auth and handle path. i want it run in this sequence handle path → basic auth → reverse proxy but the basic auth seem dont works. please help me. thank you

Can you elaborate what you mean by “don’t work”?
Thanks :innocent:

2 Likes

This topic was automatically closed after 30 days. New replies are no longer allowed.