-
Notifications
You must be signed in to change notification settings - Fork 4
/
Caddyfile.txt
59 lines (56 loc) · 1.25 KB
/
Caddyfile.txt
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
(basicfile) {
encode zstd gzip
file_server {
index index.html index.txt index.xml
}
}
(signet) {
@static {
not {
path *.html *.txt /
}
}
@gen {
path /claim/
}
# Old API address_only regex path matcher
@oldapiao {
path_regexp claimreao /claim/(tb1([02-9ac-hj-np-z]{59}|[02-9ac-hj-np-z]{39})|[mn2][a-km-zA-HJ-NP-Z1-9]{25,34})/{0,1}
}
# Old API address and amount
@oldapi {
path_regexp claimre /claim/(tb1([02-9ac-hj-np-z]{59}|[02-9ac-hj-np-z]{39})|[mn2][a-km-zA-HJ-NP-Z1-9]{25,34})/(0{0,1}\.[01][0-9]*)/{0,1}.*
}
@apiroute {
method GET
path /claim/tb1* /claim/m* /claim/n* /claim/2*
}
route @apiroute {
rewrite @oldapi /claim/?address={re.claimre.1}&amount={re.claimre.2}
rewrite @oldapiao /claim/?address={re.claimreao.1}
}
route @gen {
handle @gen {
reverse_proxy http://127.0.0.1:8125 {
header_up X-Real-IP {remote_host}
}
}
}
route * {
root * /home/nsm/web/bitcoin-faucet-shell
header @static Cache-Control "public, max-age=31536000, immutable"
}
handle_errors {
rewrite * /{http.error.status_code}.html
file_server
}
}
http://onionaddress.onion, http://127.0.0.123 {
import basicfile
import signet
}
signet.you.domain {
import basicfile
import signet
header / Onion-Location http://onionaddress.onion
}