Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 11, 01:00 UTC
| 1 | :80 { |
| 2 | log |
| 3 | |
| 4 | vars foo foo |
| 5 | |
| 6 | log_append const bar |
| 7 | log_append vars foo |
| 8 | log_append placeholder {path} |
| 9 | |
| 10 | log_append /only-for-this-path secret value |
| 11 | } |
| 12 | ---------- |
| 13 | { |
| 14 | "apps": { |
| 15 | "http": { |
| 16 | "servers": { |
| 17 | "srv0": { |
| 18 | "listen": [ |
| 19 | ":80" |
| 20 | ], |
| 21 | "routes": [ |
| 22 | { |
| 23 | "handle": [ |
| 24 | { |
| 25 | "foo": "foo", |
| 26 | "handler": "vars" |
| 27 | } |
| 28 | ] |
| 29 | }, |
| 30 | { |
| 31 | "match": [ |
| 32 | { |
| 33 | "path": [ |
| 34 | "/only-for-this-path" |
| 35 | ] |
| 36 | } |
| 37 | ], |
| 38 | "handle": [ |
| 39 | { |
| 40 | "handler": "log_append", |
| 41 | "key": "secret", |
| 42 | "value": "value" |
| 43 | } |
| 44 | ] |
| 45 | }, |
| 46 | { |
| 47 | "handle": [ |
| 48 | { |
| 49 | "handler": "log_append", |
| 50 | "key": "const", |
| 51 | "value": "bar" |
| 52 | }, |
| 53 | { |
| 54 | "handler": "log_append", |
| 55 | "key": "vars", |
| 56 | "value": "foo" |
| 57 | }, |
| 58 | { |
| 59 | "handler": "log_append", |
| 60 | "key": "placeholder", |
| 61 | "value": "{http.request.uri.path}" |
| 62 | } |
| 63 | ] |
| 64 | } |
| 65 | ], |
| 66 | "logs": {} |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | } |