caddy: add homedir snippet
parent
4d41f1e92f
commit
636ca435c2
|
@ -4,6 +4,18 @@
|
|||
header @origin Access-Control-Request-Method GET
|
||||
}
|
||||
|
||||
(homedir) {
|
||||
@user_home path_regexp user ^/~([^/]+)(/.*)?$
|
||||
handle @user_home {
|
||||
redir /~{re.user.1} /~{re.user.1}/ permanent
|
||||
root * {args.0}{re.user.1}/WWW
|
||||
rewrite * {re.user.2}
|
||||
file_server browse {
|
||||
hide .[A-Za-z]*
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
(nobots) {
|
||||
respond /robots.txt 200 {
|
||||
body "User-agent: *
|
||||
|
|
Loading…
Reference in New Issue