caddy (snippets): fix various issues
parent
3a3a4dddcf
commit
c387cd5bb9
|
@ -1,10 +1,13 @@
|
|||
(app-redir) {
|
||||
redir https://{args[0]}.zio.sh{uri} temporary
|
||||
@redirect {
|
||||
expression `{http.request.host.labels.2} != "{args[0]}"`
|
||||
}
|
||||
redir @redirect https://{args[0]}.zio.sh{uri} temporary
|
||||
}
|
||||
|
||||
(cors) {
|
||||
@origin header Origin {args.0}
|
||||
header @origin Access-Control-Allow-Origin "{args.0}"
|
||||
@origin header Origin {args[0]}
|
||||
header @origin Access-Control-Allow-Origin "{args[0]}"
|
||||
header @origin Access-Control-Request-Method GET
|
||||
}
|
||||
|
||||
|
@ -12,7 +15,7 @@
|
|||
@user_home path_regexp user ^/~([^/]+)(/.*)?$
|
||||
handle @user_home {
|
||||
redir /~{re.user.1} /~{re.user.1}/ permanent
|
||||
root * {args.0}{re.user.1}/www
|
||||
root * {args[0]}{re.user.1}/www
|
||||
rewrite * {re.user.2}
|
||||
file_server browse {
|
||||
hide .[A-Za-z]*
|
||||
|
@ -30,7 +33,8 @@ Disallow: /"
|
|||
|
||||
(tls-cf) {
|
||||
tls {
|
||||
dns cloudflare {args.0}
|
||||
dns cloudflare {args[0]}
|
||||
resolvers 1.1.1.1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue