-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathCaddyfile
36 lines (32 loc) · 1.02 KB
/
Caddyfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
:80 {
@api_auth header Authorization "Bearer __Bearer_Token__"
@download_auth query d_token=__Download_Token__
encode gzip
handle /api/* {
handle __api_handle__ {
reverse_proxy localhost:3000
}
handle {
respond "Unauthorized" 401 {
close
}
}
}
handle /download/* {
handle __download_handle__ {
reverse_proxy localhost:3000
}
handle {
respond "由于开启了 d_token 验证,当前 d_token 不正确或未提供" 401 {
close
}
}
}
##____import /git/frontend/Caddyfile
handle {
respond / "Hello, world!"
}
handle_errors {
respond "{err.status_code} {err.status_text}"
}
}