@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 82 lines 1.07 KB
Raw
1 (snippet) {
2 header {
3 {blocks.bar}
4 }
5 import sub_snippet {
6 bar {
7 {blocks.foo}
8 }
9 }
10 }
11 (sub_snippet) {
12 header {
13 {blocks.bar}
14 }
15 }
16 example.com {
17 import snippet {
18 foo {
19 foo a
20 }
21 bar {
22 bar b
23 }
24 }
25 }
26 ----------
27 {
28 "apps": {
29 "http": {
30 "servers": {
31 "srv0": {
32 "listen": [
33 ":443"
34 ],
35 "routes": [
36 {
37 "match": [
38 {
39 "host": [
40 "example.com"
41 ]
42 }
43 ],
44 "handle": [
45 {
46 "handler": "subroute",
47 "routes": [
48 {
49 "handle": [
50 {
51 "handler": "headers",
52 "response": {
53 "set": {
54 "Bar": [
55 "b"
56 ]
57 }
58 }
59 },
60 {
61 "handler": "headers",
62 "response": {
63 "set": {
64 "Foo": [
65 "a"
66 ]
67 }
68 }
69 }
70 ]
71 }
72 ]
73 }
74 ],
75 "terminal": true
76 }
77 ]
78 }
79 }
80 }
81 }
82 }