mirror of
https://github.com/caddyserver/caddy.git
synced 2025-12-08 06:09:53 +00:00
caddyauth: Allow user-configurable headers and status code
This commit is contained in:
parent
f5f25d845a
commit
1b2abe0c1a
12 changed files with 636 additions and 17 deletions
|
|
@ -0,0 +1,59 @@
|
|||
https://example.com
|
||||
basic_auth bcrypt {
|
||||
Aladdin $2a$14$U5nG2p.Ac09gzn9oo5aRe.YnsXn30UdXA6pRUn45KFqADG636dRHa
|
||||
}
|
||||
|
||||
----------
|
||||
{
|
||||
"apps": {
|
||||
"http": {
|
||||
"servers": {
|
||||
"srv0": {
|
||||
"listen": [
|
||||
":443"
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"match": [
|
||||
{
|
||||
"host": [
|
||||
"example.com"
|
||||
]
|
||||
}
|
||||
],
|
||||
"handle": [
|
||||
{
|
||||
"handler": "subroute",
|
||||
"routes": [
|
||||
{
|
||||
"handle": [
|
||||
{
|
||||
"handler": "authentication",
|
||||
"providers": {
|
||||
"http_basic": {
|
||||
"accounts": [
|
||||
{
|
||||
"password": "$2a$14$U5nG2p.Ac09gzn9oo5aRe.YnsXn30UdXA6pRUn45KFqADG636dRHa",
|
||||
"username": "Aladdin"
|
||||
}
|
||||
],
|
||||
"hash": {
|
||||
"algorithm": "bcrypt"
|
||||
},
|
||||
"hash_cache": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"terminal": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue