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