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