(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 }