feat: add basic auth to caddy
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
}
|
||||
|
||||
:80 {
|
||||
basicauth /* {
|
||||
{$AUTH_USER:admin} {$AUTH_HASH:$2a$14$J3A9qfgJTikjVe.XmDn49OUjOrPiiwAN3.SXbK1tvfef1XzDkIuRm}
|
||||
}
|
||||
|
||||
encode zstd gzip
|
||||
|
||||
@mcp path /mcp
|
||||
|
||||
@@ -82,3 +82,14 @@ docker run --rm \
|
||||
|
||||
Bind-mounting a different file to `/config/styles-guide.md` overrides the bundled default for that container.
|
||||
Local non-container runs are unchanged; if you want a styles guide there, you still need a file at `/config/styles-guide.md`.
|
||||
|
||||
## Authentication
|
||||
|
||||
By default, the application is protected by basic authentication using Caddy.
|
||||
The default credentials are:
|
||||
- **Username:** `admin`
|
||||
- **Password:** `password`
|
||||
|
||||
You can customize these by setting the following environment variables when running the Docker container:
|
||||
- `AUTH_USER`: The username for authentication.
|
||||
- `AUTH_HASH`: The bcrypt hash of the password. You can generate a bcrypt hash using tools like `htpasswd` or Caddy's built-in `caddy hash-password` command.
|
||||
|
||||
Reference in New Issue
Block a user