github.com/vicanso/pike@v1.0.1-0.20210630235453-9099e041f6ec/pike.yml (about) 1 version: 4.0.4 2 admin: 3 user: vicanso 4 password: z6+5xIgzATEPuK5T8LL8/SLWI7HhZdm5OJ445xaHsX0= 5 compresses: 6 - name: compressCommon 7 levels: 8 br: 6 9 gzip: 6 10 remark: 通用压缩配置 11 caches: 12 - name: cacheCommon 13 size: 51200 14 hitForPass: 5m 15 store: badger:///tmp/badger 16 remark: 通用缓存配置 17 upstreams: 18 - name: upstreamTest 19 healthCheck: /ping 20 policy: roundRobin 21 servers: 22 - addr: http://test:3000 23 remark: 测试使用的upstream 24 locations: 25 - name: locationTest 26 upstream: upstreamTest 27 prefixes: 28 - /api 29 rewrites: 30 - /api/*:/$1 31 proxyTimeout: 30s 32 remark: 测试location 33 servers: 34 - logFormat: '{when-iso} {real-ip} {remote} {:proxyTarget} {host} {method} {uri} {proto} {status} {<x-status} {size-human} {referer} {userAgent}' 35 addr: :3015 36 locations: 37 - locationTest 38 cache: cacheCommon 39 compress: compressCommon 40 compressMinLength: 1kb 41 remark: 测试服务,监听地址:3015