mirror of
https://github.com/lucaslorentz/caddy-docker-proxy.git
synced 2025-12-12 18:21:18 +01:00
2
HTTP Basic Authentication
jpduyx edited this page 2024-02-13 22:40:20 +02:00
HTTP Basic Authentication can be created like this:
caddy.basicauth: /secret/*
caddy.basicauth.Bob: $$2a$$14$$Zkx19XLiW6VYouLHR5NmfOFU0z2GTNmpkT/5qqR7hx4IjWJPDhjvG
↓
basicauth /secret/* {
Bob $2a$14$Zkx19XLiW6VYouLHR5NmfOFU0z2GTNmpkT/5qqR7hx4IjWJPDhjvG
}
Protects all resources in /secret so only Bob can access them with the password "hiccup".
NOTE in docker-compose.yml you should escape the $ in the password with double dollar