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 | { |
| 2 | servers { |
| 3 | listener_wrappers { |
| 4 | http_redirect |
| 5 | tls |
| 6 | } |
| 7 | timeouts { |
| 8 | read_body 30s |
| 9 | read_header 30s |
| 10 | write 30s |
| 11 | idle 30s |
| 12 | } |
| 13 | max_header_size 100MB |
| 14 | enable_full_duplex |
| 15 | webtransport |
| 16 | log_credentials |
| 17 | protocols h1 h2 h2c h3 |
| 18 | strict_sni_host |
| 19 | trusted_proxies static private_ranges |
| 20 | client_ip_headers Custom-Real-Client-IP X-Forwarded-For |
| 21 | client_ip_headers A-Third-One |
| 22 | keepalive_interval 20s |
| 23 | keepalive_idle 20s |
| 24 | keepalive_count 10 |
| 25 | 0rtt off |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | foo.com { |
| 30 | } |
| 31 | |
| 32 | ---------- |
| 33 | { |
| 34 | "apps": { |
| 35 | "http": { |
| 36 | "servers": { |
| 37 | "srv0": { |
| 38 | "listen": [ |
| 39 | ":443" |
| 40 | ], |
| 41 | "listener_wrappers": [ |
| 42 | { |
| 43 | "wrapper": "http_redirect" |
| 44 | }, |
| 45 | { |
| 46 | "wrapper": "tls" |
| 47 | } |
| 48 | ], |
| 49 | "read_timeout": 30000000000, |
| 50 | "read_header_timeout": 30000000000, |
| 51 | "write_timeout": 30000000000, |
| 52 | "idle_timeout": 30000000000, |
| 53 | "keepalive_interval": 20000000000, |
| 54 | "keepalive_idle": 20000000000, |
| 55 | "keepalive_count": 10, |
| 56 | "max_header_bytes": 100000000, |
| 57 | "enable_full_duplex": true, |
| 58 | "webtransport": {}, |
| 59 | "routes": [ |
| 60 | { |
| 61 | "match": [ |
| 62 | { |
| 63 | "host": [ |
| 64 | "foo.com" |
| 65 | ] |
| 66 | } |
| 67 | ], |
| 68 | "terminal": true |
| 69 | } |
| 70 | ], |
| 71 | "strict_sni_host": true, |
| 72 | "trusted_proxies": { |
| 73 | "ranges": [ |
| 74 | "192.168.0.0/16", |
| 75 | "172.16.0.0/12", |
| 76 | "10.0.0.0/8", |
| 77 | "127.0.0.1/8", |
| 78 | "fd00::/8", |
| 79 | "::1" |
| 80 | ], |
| 81 | "source": "static" |
| 82 | }, |
| 83 | "client_ip_headers": [ |
| 84 | "Custom-Real-Client-IP", |
| 85 | "X-Forwarded-For", |
| 86 | "A-Third-One" |
| 87 | ], |
| 88 | "logs": { |
| 89 | "should_log_credentials": true |
| 90 | }, |
| 91 | "protocols": [ |
| 92 | "h1", |
| 93 | "h2", |
| 94 | "h2c", |
| 95 | "h3" |
| 96 | ], |
| 97 | "allow_0rtt": false |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | } |