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 | (snippet) { |
| 2 | header { |
| 3 | {block} |
| 4 | } |
| 5 | } |
| 6 | |
| 7 | example.com { |
| 8 | import snippet { |
| 9 | foo bar |
| 10 | } |
| 11 | } |
| 12 | ---------- |
| 13 | { |
| 14 | "apps": { |
| 15 | "http": { |
| 16 | "servers": { |
| 17 | "srv0": { |
| 18 | "listen": [ |
| 19 | ":443" |
| 20 | ], |
| 21 | "routes": [ |
| 22 | { |
| 23 | "match": [ |
| 24 | { |
| 25 | "host": [ |
| 26 | "example.com" |
| 27 | ] |
| 28 | } |
| 29 | ], |
| 30 | "handle": [ |
| 31 | { |
| 32 | "handler": "subroute", |
| 33 | "routes": [ |
| 34 | { |
| 35 | "handle": [ |
| 36 | { |
| 37 | "handler": "headers", |
| 38 | "response": { |
| 39 | "set": { |
| 40 | "Foo": [ |
| 41 | "bar" |
| 42 | ] |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | ] |
| 47 | } |
| 48 | ] |
| 49 | } |
| 50 | ], |
| 51 | "terminal": true |
| 52 | } |
| 53 | ] |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | } |