@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 90 lines 1.4 KB
Raw
1 :80
2
3 @matcher path /something*
4 request_header @matcher Denis "Ritchie"
5
6 request_header +Edsger "Dijkstra"
7 request_header -Wolfram
8
9 @images path /images/*
10 request_header @images Cache-Control "public, max-age=3600, stale-while-revalidate=86400"
11 ----------
12 {
13 "apps": {
14 "http": {
15 "servers": {
16 "srv0": {
17 "listen": [
18 ":80"
19 ],
20 "routes": [
21 {
22 "match": [
23 {
24 "path": [
25 "/something*"
26 ]
27 }
28 ],
29 "handle": [
30 {
31 "handler": "headers",
32 "request": {
33 "set": {
34 "Denis": [
35 "Ritchie"
36 ]
37 }
38 }
39 }
40 ]
41 },
42 {
43 "match": [
44 {
45 "path": [
46 "/images/*"
47 ]
48 }
49 ],
50 "handle": [
51 {
52 "handler": "headers",
53 "request": {
54 "set": {
55 "Cache-Control": [
56 "public, max-age=3600, stale-while-revalidate=86400"
57 ]
58 }
59 }
60 }
61 ]
62 },
63 {
64 "handle": [
65 {
66 "handler": "headers",
67 "request": {
68 "add": {
69 "Edsger": [
70 "Dijkstra"
71 ]
72 }
73 }
74 },
75 {
76 "handler": "headers",
77 "request": {
78 "delete": [
79 "Wolfram"
80 ]
81 }
82 }
83 ]
84 }
85 ]
86 }
87 }
88 }
89 }
90 }