Skip to content

HTTP Basic Authentication

Lucas Lorentz edited this page Nov 30, 2023 · 2 revisions

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".

Clone this wiki locally