-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.sample.all.json
More file actions
136 lines (136 loc) · 4 KB
/
config.sample.all.json
File metadata and controls
136 lines (136 loc) · 4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
"listeners": {
"all-on-80": { "addr": ":80", "tls": false, "redirect_to_https": true, "redirect_to_https_status": 301 },
"all-on-443": { "addr": ":443", "tls": true, "max_connections": 10000, "min_tls_version": "1.2" },
"mtls-on-8443": { "addr": ":8443", "tls": true, "client_ca": "/etc/ssl/certs/client-ca.pem", "min_tls_version": "1.3" }
},
"routing": {
"all-on-80": [
{ "host": "site1.example.com", "to": "127.0.0.1:8080", "tls": false },
{ "host": "site2.example.com", "to": "127.0.0.1:9090", "tls": false }
],
"all-on-443": {
"site1.example.com": [
{ "path": "/api", "to": "127.0.0.1:3000", "tls": false, "strip_prefix": "/api", "add_prefix": "/v1" },
{ "path": "/api", "to": "127.0.0.1:3001", "tls": false, "methods": ["POST", "PUT", "DELETE"], "strip_prefix": "/api" },
{ "path": "/api", "to": "127.0.0.1:3002", "tls": false, "match_header": "X-Api-Version: v2", "strip_prefix": "/api" },
{ "path": "/", "to": "127.0.0.1:8080", "tls": false }
]
},
"mtls-on-8443": [
{ "host": "*.internal.example.com", "to": "127.0.0.1:7070", "tls": false }
]
},
"sites-config-defaults": {
"verbose": false,
"site_under_maintenance_file": "",
"compress": true,
"max_request_body_bytes": 10485760,
"rate_limit_rps": 100,
"rate_limit_burst": 200,
"max_idle_conns": 100,
"trusted_proxies": [
"127.0.0.0/8",
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"::1/128",
"fc00::/7"
],
"timeouts": {
"dial": "5s",
"keep_alive": "30s",
"tls_handshake": "10s",
"response_header": "30s",
"idle_conn": "90s",
"read_header": "10s",
"server_idle": "120s",
"shutdown": "10s"
},
"request_headers": {
"add": {"X-Forwarded-By": "simple-http-router"},
"remove": ["X-Powered-By", "Proxy-Connection"]
},
"response_headers": {
"set": {
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Referrer-Policy": "strict-origin-when-cross-origin",
"Permissions-Policy": "camera=(), microphone=(), geolocation=()"
},
"remove": ["Server", "X-Powered-By"]
},
"cors": {
"allowed_origins": ["*"],
"allowed_methods": ["GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"],
"allowed_headers": ["Content-Type", "Authorization", "X-Request-ID"],
"max_age": 86400
},
"redirects": [
{ "from": "/healthz", "to": "/health", "status": 301 }
],
"error_pages": {
"502": "/var/www/errors/502.html",
"503": "/var/www/errors/503.html"
},
"hsts": {
"max_age": 31536000,
"include_subdomains": true,
"preload": false
},
"cert": {
"renew": true,
"renew_account": {
"email": "admin@example.com",
"cache_dir": "cert-cache",
"use_staging": false
},
"no_renew_cert": "/etc/ssl/certs/default.crt",
"no_renew_key": "/etc/ssl/private/default.key"
}
},
"sites-config-overrides": {
"site1.example.com": {
"verbose": true,
"site_under_maintenance_file": "",
"compress": true,
"max_request_body_bytes": 10485760,
"rate_limit_rps": 100,
"rate_limit_burst": 50,
"max_idle_conns": 50,
"trusted_proxies": ["127.0.0.0/8"],
"timeouts": {"dial": "5s"},
"request_headers": {
"add": {"X-Forwarded-By": "simple-http-router"}
},
"response_headers": {
"set": {"X-Content-Type-Options": "nosniff"}
},
"cors": {
"allowed_origins": ["https://app.example.com", "https://admin.example.com"],
"allowed_methods": ["GET", "POST", "PUT", "DELETE"],
"allowed_headers": ["Content-Type", "Authorization"],
"max_age": 3600
},
"redirects": [
{ "from": "/blog", "to": "https://blog.example.com", "status": 301 },
{ "from": "/old-api", "to": "/api", "status": 302 }
],
"error_pages": {
"404": "/var/www/errors/404.html",
"502": "/var/www/errors/502.html"
},
"hsts": {
"max_age": 63072000,
"include_subdomains": true,
"preload": true
},
"cert": {"renew": false},
"basic_auth": {
"username": "admin",
"password_hash": "$2y$10$0Z2sKawf0Ygs7aGHFH47weLk0NTpuZUn./DHx2c/huXk0E4Vy.jHm",
"realm": "Admin Area"
}
}
}
}