@marcel91200 / caddy Mirror · read-only
Fork 0

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

master
caddyfiletest 66 lines 831 Bytes
Raw
1 (inner) {
2 respond "inner"
3 }
4
5 (outer) {
6 import inner
7 }
8
9 &(foo) {
10 import outer
11 }
12
13 localhost:9080 {
14 invoke foo
15 }
16 ----------
17 {
18 "apps": {
19 "http": {
20 "servers": {
21 "srv0": {
22 "listen": [
23 ":9080"
24 ],
25 "routes": [
26 {
27 "match": [
28 {
29 "host": [
30 "localhost"
31 ]
32 }
33 ],
34 "handle": [
35 {
36 "handler": "subroute",
37 "routes": [
38 {
39 "handle": [
40 {
41 "handler": "invoke",
42 "name": "foo"
43 }
44 ]
45 }
46 ]
47 }
48 ],
49 "terminal": true
50 }
51 ],
52 "named_routes": {
53 "foo": {
54 "handle": [
55 {
56 "body": "inner",
57 "handler": "static_response"
58 }
59 ]
60 }
61 }
62 }
63 }
64 }
65 }
66 }