Merge ~hloeung/content-cache-charm:log into content-cache-charm:master
- Git
- lp:~hloeung/content-cache-charm
- log
- Merge into master
Proposed by
Haw Loeung
Status: | Merged |
---|---|
Approved by: | Haw Loeung |
Approved revision: | 9e2a6125b64b7d258563503e8a56d1bc10ba7d73 |
Merged at revision: | ecc5578a0c9e979e1f3e877c3987a2c7627d41bf |
Proposed branch: | ~hloeung/content-cache-charm:log |
Merge into: | content-cache-charm:master |
Diff against target: |
1056 lines (+121/-121) 17 files modified
files/nginx-logging-format.conf (+1/-1) lib/haproxy.py (+2/-2) reactive/content_cache.py (+1/-1) tests/unit/files/config_test_config.txt (+1/-1) tests/unit/files/config_test_sites_map.txt (+1/-1) tests/unit/files/content_cache_rendered_haproxy_test_output.txt (+20/-20) tests/unit/files/content_cache_rendered_haproxy_test_output2.txt (+2/-2) tests/unit/files/content_cache_rendered_haproxy_test_output3.txt (+2/-2) tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt (+20/-20) tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt (+3/-3) tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt (+20/-20) tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt (+20/-20) tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt (+20/-20) tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt (+2/-2) tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt (+2/-2) tests/unit/files/haproxy_config_rendered_test_output.txt (+2/-2) tests/unit/files/haproxy_config_rendered_test_output2.txt (+2/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Misare | Approve | ||
Canonical IS Reviewers | Pending | ||
Canonical IS Reviewers | Pending | ||
Review via email: mp+397698@code.launchpad.net |
This proposal supersedes a proposal from 2021-02-08.
Commit message
Introduce new header X-Cache-Request-IP and log that
This prevents spoofing of X-Forward-For or any additional hops from
being logged.
Description of the change
To post a comment you must log in.
Revision history for this message
Haw Loeung (hloeung) wrote : Posted in a previous version of this proposal | # |
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : Posted in a previous version of this proposal | # |
This merge proposal is being monitored by mergebot. Change the status to Approved to merge.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : | # |
This merge proposal is being monitored by mergebot. Change the status to Approved to merge.
Revision history for this message
Colin Misare (cmisare) wrote : | # |
One question inline
Revision history for this message
Haw Loeung (hloeung) : | # |
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote : | # |
Change successfully merged at revision ecc5578a0c9e979
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/files/nginx-logging-format.conf b/files/nginx-logging-format.conf | |||
2 | index a646743..b9df464 100644 | |||
3 | --- a/files/nginx-logging-format.conf | |||
4 | +++ b/files/nginx-logging-format.conf | |||
5 | @@ -1,4 +1,4 @@ | |||
7 | 1 | log_format content_cache '$http_x_forwarded_for - $remote_user [$time_local] ' | 1 | log_format content_cache '$http_x_cache_request_ip - $remote_user [$time_local] ' |
8 | 2 | '"$request" $status $bytes_sent ' | 2 | '"$request" $status $bytes_sent ' |
9 | 3 | '"$http_referer" "$http_user_agent" $request_time ' | 3 | '"$http_referer" "$http_user_agent" $request_time ' |
10 | 4 | '$upstream_cache_status $upstream_response_time ' | 4 | '$upstream_cache_status $upstream_response_time ' |
11 | diff --git a/lib/haproxy.py b/lib/haproxy.py | |||
12 | index 2bf795e..597131e 100644 | |||
13 | --- a/lib/haproxy.py | |||
14 | +++ b/lib/haproxy.py | |||
15 | @@ -222,8 +222,8 @@ listen {name} | |||
16 | 222 | def render_stanza_backend(self, config): # NOQA: C901 | 222 | def render_stanza_backend(self, config): # NOQA: C901 |
17 | 223 | backend_stanza = """ | 223 | backend_stanza = """ |
18 | 224 | backend backend-{name} | 224 | backend backend-{name} |
21 | 225 | {options}{indent}{httpchk} | 225 | {indent}{httpchk} |
22 | 226 | {indent}http-request set-header Host {site_name} | 226 | {options}{indent}http-request set-header Host {site_name} |
23 | 227 | {indent}balance {load_balancing_algorithm} | 227 | {indent}balance {load_balancing_algorithm} |
24 | 228 | {backends} | 228 | {backends} |
25 | 229 | """ | 229 | """ |
26 | diff --git a/reactive/content_cache.py b/reactive/content_cache.py | |||
27 | index ec681d6..9f95727 100644 | |||
28 | --- a/reactive/content_cache.py | |||
29 | +++ b/reactive/content_cache.py | |||
30 | @@ -281,7 +281,7 @@ def configure_haproxy(): # NOQA: C901 LP#1825084 | |||
31 | 281 | # Also, for caching layer, we want higher fall count as it's less | 281 | # Also, for caching layer, we want higher fall count as it's less |
32 | 282 | # likely the caching layer is down, 2 mins here (inter * fall). | 282 | # likely the caching layer is down, 2 mins here (inter * fall). |
33 | 283 | new_cached_loc_conf['backend-fall-count'] = 60 | 283 | new_cached_loc_conf['backend-fall-count'] = 60 |
35 | 284 | new_cached_loc_conf['backend-options'] = ['forwardfor'] | 284 | new_cached_loc_conf['backend-options'] = ['http-request set-header X-Cache-Request-IP %[src]'] |
36 | 285 | 285 | ||
37 | 286 | # No backends | 286 | # No backends |
38 | 287 | if not site_conf['locations'][location].get('backends'): | 287 | if not site_conf['locations'][location].get('backends'): |
39 | diff --git a/tests/unit/files/config_test_config.txt b/tests/unit/files/config_test_config.txt | |||
40 | index bae4473..688b8af 100644 | |||
41 | --- a/tests/unit/files/config_test_config.txt | |||
42 | +++ b/tests/unit/files/config_test_config.txt | |||
43 | @@ -46,7 +46,7 @@ site3.local: | |||
44 | 46 | /: | 46 | /: |
45 | 47 | backends: *BACKENDS | 47 | backends: *BACKENDS |
46 | 48 | backend-options: | 48 | backend-options: |
48 | 49 | - forwardfor except 127.0.0.1 | 49 | - forwardfor except 127.0.0.1 192.168.1.1 |
49 | 50 | - forceclose | 50 | - forceclose |
50 | 51 | cache-maxconn: 4096 | 51 | cache-maxconn: 4096 |
51 | 52 | 52 | ||
52 | diff --git a/tests/unit/files/config_test_sites_map.txt b/tests/unit/files/config_test_sites_map.txt | |||
53 | index 7158e24..6f130c7 100644 | |||
54 | --- a/tests/unit/files/config_test_sites_map.txt | |||
55 | +++ b/tests/unit/files/config_test_sites_map.txt | |||
56 | @@ -39,7 +39,7 @@ site3.local: | |||
57 | 39 | locations: | 39 | locations: |
58 | 40 | /: | 40 | /: |
59 | 41 | backend-options: | 41 | backend-options: |
61 | 42 | - forwardfor except 127.0.0.1 | 42 | - forwardfor except 127.0.0.1 192.168.1.1 |
62 | 43 | - forceclose | 43 | - forceclose |
63 | 44 | backend_port: 8082 | 44 | backend_port: 8082 |
64 | 45 | backends: | 45 | backends: |
65 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt | |||
66 | index 9f6292d..2e20fd6 100644 | |||
67 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output.txt | |||
68 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output.txt | |||
69 | @@ -155,15 +155,15 @@ listen site9-local | |||
70 | 155 | default_backend backend-site9-local | 155 | default_backend backend-site9-local |
71 | 156 | 156 | ||
72 | 157 | backend backend-cached-site1-local | 157 | backend backend-cached-site1-local |
73 | 158 | option forwardfor | ||
74 | 159 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 158 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
75 | 159 | http-request set-header X-Cache-Request-IP %[src] | ||
76 | 160 | http-request set-header Host site1.local | 160 | http-request set-header Host site1.local |
77 | 161 | balance leastconn | 161 | balance leastconn |
78 | 162 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 | 162 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
79 | 163 | 163 | ||
80 | 164 | backend backend-site1-local | 164 | backend backend-site1-local |
81 | 165 | option redispatch 1 | ||
82 | 166 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 165 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
83 | 166 | option redispatch 1 | ||
84 | 167 | http-request set-header Host site1.local | 167 | http-request set-header Host site1.local |
85 | 168 | balance leastconn | 168 | balance leastconn |
86 | 169 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 169 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
87 | @@ -171,15 +171,15 @@ backend backend-site1-local | |||
88 | 171 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 171 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
89 | 172 | 172 | ||
90 | 173 | backend backend-cached-site2-local | 173 | backend backend-cached-site2-local |
91 | 174 | option forwardfor | ||
92 | 175 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | 174 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
93 | 175 | http-request set-header X-Cache-Request-IP %[src] | ||
94 | 176 | http-request set-header Host site2.local | 176 | http-request set-header Host site2.local |
95 | 177 | balance leastconn | 177 | balance leastconn |
96 | 178 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 | 178 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
97 | 179 | 179 | ||
98 | 180 | backend backend-site2-local | 180 | backend backend-site2-local |
99 | 181 | option redispatch 1 | ||
100 | 182 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | 181 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
101 | 182 | option redispatch 1 | ||
102 | 183 | http-request set-header Host site2.local | 183 | http-request set-header Host site2.local |
103 | 184 | balance leastconn | 184 | balance leastconn |
104 | 185 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 185 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
105 | @@ -187,17 +187,17 @@ backend backend-site2-local | |||
106 | 187 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 187 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
107 | 188 | 188 | ||
108 | 189 | backend backend-cached-site3-local | 189 | backend backend-cached-site3-local |
109 | 190 | option forwardfor | ||
110 | 191 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | 190 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
111 | 191 | http-request set-header X-Cache-Request-IP %[src] | ||
112 | 192 | http-request set-header Host site3.local | 192 | http-request set-header Host site3.local |
113 | 193 | balance leastconn | 193 | balance leastconn |
114 | 194 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 | 194 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
115 | 195 | 195 | ||
116 | 196 | backend backend-site3-local | 196 | backend backend-site3-local |
118 | 197 | option forwardfor except 127.0.0.1 | 197 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
119 | 198 | option forwardfor except 127.0.0.1 192.168.1.1 | ||
120 | 198 | option forceclose | 199 | option forceclose |
121 | 199 | option redispatch 1 | 200 | option redispatch 1 |
122 | 200 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | ||
123 | 201 | http-request set-header Host site3.local | 201 | http-request set-header Host site3.local |
124 | 202 | balance leastconn | 202 | balance leastconn |
125 | 203 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 203 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
126 | @@ -205,92 +205,92 @@ backend backend-site3-local | |||
127 | 205 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 205 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
128 | 206 | 206 | ||
129 | 207 | backend backend-cached-site4-local | 207 | backend backend-cached-site4-local |
130 | 208 | option forwardfor | ||
131 | 209 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk | 208 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
132 | 209 | http-request set-header X-Cache-Request-IP %[src] | ||
133 | 210 | http-request set-header Host site4.local | 210 | http-request set-header Host site4.local |
134 | 211 | balance leastconn | 211 | balance leastconn |
135 | 212 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 | 212 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
136 | 213 | 213 | ||
137 | 214 | backend backend-cached-site5 | 214 | backend backend-cached-site5 |
138 | 215 | option forwardfor | ||
139 | 216 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 215 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
140 | 216 | http-request set-header X-Cache-Request-IP %[src] | ||
141 | 217 | http-request set-header Host site5.local | 217 | http-request set-header Host site5.local |
142 | 218 | balance leastconn | 218 | balance leastconn |
143 | 219 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 | 219 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
144 | 220 | 220 | ||
145 | 221 | backend backend-site5 | 221 | backend backend-site5 |
146 | 222 | option redispatch 1 | ||
147 | 223 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 222 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
148 | 223 | option redispatch 1 | ||
149 | 224 | http-request set-header Host site5.local | 224 | http-request set-header Host site5.local |
150 | 225 | balance leastconn | 225 | balance leastconn |
151 | 226 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 226 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
152 | 227 | 227 | ||
153 | 228 | backend backend-site5-2 | 228 | backend backend-site5-2 |
154 | 229 | option redispatch 1 | ||
155 | 230 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 229 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
156 | 230 | option redispatch 1 | ||
157 | 231 | http-request set-header Host site5.local | 231 | http-request set-header Host site5.local |
158 | 232 | balance leastconn | 232 | balance leastconn |
159 | 233 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 | 233 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
160 | 234 | 234 | ||
161 | 235 | backend backend-cached-site6-local | 235 | backend backend-cached-site6-local |
162 | 236 | option forwardfor | ||
163 | 237 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | 236 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
164 | 237 | http-request set-header X-Cache-Request-IP %[src] | ||
165 | 238 | http-request set-header Host site6.local | 238 | http-request set-header Host site6.local |
166 | 239 | balance leastconn | 239 | balance leastconn |
167 | 240 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 | 240 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
168 | 241 | 241 | ||
169 | 242 | backend backend-site6-local | 242 | backend backend-site6-local |
170 | 243 | option redispatch 1 | ||
171 | 244 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | 243 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
172 | 244 | option redispatch 1 | ||
173 | 245 | http-request set-header Host site6.local | 245 | http-request set-header Host site6.local |
174 | 246 | balance leastconn | 246 | balance leastconn |
175 | 247 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt | 247 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
176 | 248 | 248 | ||
177 | 249 | backend backend-cached-site7-local | 249 | backend backend-cached-site7-local |
178 | 250 | option forwardfor | ||
179 | 251 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | 250 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
180 | 251 | http-request set-header X-Cache-Request-IP %[src] | ||
181 | 252 | http-request set-header Host site7.local | 252 | http-request set-header Host site7.local |
182 | 253 | balance leastconn | 253 | balance leastconn |
183 | 254 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 | 254 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
184 | 255 | 255 | ||
185 | 256 | backend backend-site7-local | 256 | backend backend-site7-local |
186 | 257 | option redispatch 1 | ||
187 | 258 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | 257 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
188 | 258 | option redispatch 1 | ||
189 | 259 | http-request set-header Host site7.local | 259 | http-request set-header Host site7.local |
190 | 260 | balance leastconn | 260 | balance leastconn |
191 | 261 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 261 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
192 | 262 | 262 | ||
193 | 263 | backend backend-cached-site8-local | 263 | backend backend-cached-site8-local |
194 | 264 | option forwardfor | ||
195 | 265 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | 264 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
196 | 265 | http-request set-header X-Cache-Request-IP %[src] | ||
197 | 266 | http-request set-header Host site8.local | 266 | http-request set-header Host site8.local |
198 | 267 | balance leastconn | 267 | balance leastconn |
199 | 268 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 | 268 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
200 | 269 | 269 | ||
201 | 270 | backend backend-site8-local | 270 | backend backend-site8-local |
202 | 271 | option redispatch 1 | ||
203 | 272 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | 271 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
204 | 272 | option redispatch 1 | ||
205 | 273 | http-request set-header Host site8.local | 273 | http-request set-header Host site8.local |
206 | 274 | balance leastconn | 274 | balance leastconn |
207 | 275 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 275 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
208 | 276 | 276 | ||
209 | 277 | backend backend-site8-local-2 | 277 | backend backend-site8-local-2 |
210 | 278 | option redispatch 1 | ||
211 | 279 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk | 278 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
212 | 279 | option redispatch 1 | ||
213 | 280 | http-request set-header Host auth.site8.local | 280 | http-request set-header Host auth.site8.local |
214 | 281 | balance leastconn | 281 | balance leastconn |
215 | 282 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt | 282 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
216 | 283 | 283 | ||
217 | 284 | backend backend-cached-site9-local | 284 | backend backend-cached-site9-local |
218 | 285 | option forwardfor | ||
219 | 286 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | 285 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
220 | 286 | http-request set-header X-Cache-Request-IP %[src] | ||
221 | 287 | http-request set-header Host site9.local | 287 | http-request set-header Host site9.local |
222 | 288 | balance leastconn | 288 | balance leastconn |
223 | 289 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 | 289 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
224 | 290 | 290 | ||
225 | 291 | backend backend-site9-local | 291 | backend backend-site9-local |
226 | 292 | option redispatch 1 | ||
227 | 293 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | 292 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
228 | 293 | option redispatch 1 | ||
229 | 294 | http-request set-header Host site9.local | 294 | http-request set-header Host site9.local |
230 | 295 | balance leastconn | 295 | balance leastconn |
231 | 296 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 | 296 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
232 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt | |||
233 | index 22ddfcd..5f6824b 100644 | |||
234 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt | |||
235 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output2.txt | |||
236 | @@ -90,16 +90,16 @@ listen site1-local | |||
237 | 90 | default_backend backend-site1-local | 90 | default_backend backend-site1-local |
238 | 91 | 91 | ||
239 | 92 | backend backend-cached-site1-local | 92 | backend backend-cached-site1-local |
240 | 93 | option forwardfor | ||
241 | 94 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 93 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
242 | 94 | http-request set-header X-Cache-Request-IP %[src] | ||
243 | 95 | http-request set-header Host site1.local | 95 | http-request set-header Host site1.local |
244 | 96 | balance leastconn | 96 | balance leastconn |
245 | 97 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200 | 97 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200 |
246 | 98 | 98 | ||
247 | 99 | backend backend-site1-local | 99 | backend backend-site1-local |
248 | 100 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | ||
249 | 100 | retries 3 | 101 | retries 3 |
250 | 101 | option redispatch 1 | 102 | option redispatch 1 |
251 | 102 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | ||
252 | 103 | http-request set-header Host site1.local | 103 | http-request set-header Host site1.local |
253 | 104 | balance leastconn | 104 | balance leastconn |
254 | 105 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 | 105 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 |
255 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt | |||
256 | index dd8a6f7..83641cc 100644 | |||
257 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt | |||
258 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output3.txt | |||
259 | @@ -96,15 +96,15 @@ listen site1-local | |||
260 | 96 | default_backend backend-site1-local | 96 | default_backend backend-site1-local |
261 | 97 | 97 | ||
262 | 98 | backend backend-cached-site1-local | 98 | backend backend-cached-site1-local |
263 | 99 | option forwardfor | ||
264 | 100 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 99 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
265 | 100 | http-request set-header X-Cache-Request-IP %[src] | ||
266 | 101 | http-request set-header Host site1.local | 101 | http-request set-header Host site1.local |
267 | 102 | balance leastconn | 102 | balance leastconn |
268 | 103 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200 | 103 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 200 |
269 | 104 | 104 | ||
270 | 105 | backend backend-site1-local | 105 | backend backend-site1-local |
271 | 106 | option redispatch 1 | ||
272 | 107 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 106 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
273 | 107 | option redispatch 1 | ||
274 | 108 | http-request set-header Host site1.local | 108 | http-request set-header Host site1.local |
275 | 109 | balance leastconn | 109 | balance leastconn |
276 | 110 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 | 110 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 |
277 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt | |||
278 | index 8de817a..e417ae8 100644 | |||
279 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt | |||
280 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_auto_maxconns.txt | |||
281 | @@ -155,15 +155,15 @@ listen site9-local | |||
282 | 155 | default_backend backend-site9-local | 155 | default_backend backend-site9-local |
283 | 156 | 156 | ||
284 | 157 | backend backend-cached-site1-local | 157 | backend backend-cached-site1-local |
285 | 158 | option forwardfor | ||
286 | 159 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 158 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
287 | 159 | http-request set-header X-Cache-Request-IP %[src] | ||
288 | 160 | http-request set-header Host site1.local | 160 | http-request set-header Host site1.local |
289 | 161 | balance leastconn | 161 | balance leastconn |
290 | 162 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 | 162 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
291 | 163 | 163 | ||
292 | 164 | backend backend-site1-local | 164 | backend backend-site1-local |
293 | 165 | option redispatch 1 | ||
294 | 166 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 165 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
295 | 166 | option redispatch 1 | ||
296 | 167 | http-request set-header Host site1.local | 167 | http-request set-header Host site1.local |
297 | 168 | balance leastconn | 168 | balance leastconn |
298 | 169 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 169 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
299 | @@ -171,15 +171,15 @@ backend backend-site1-local | |||
300 | 171 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 171 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
301 | 172 | 172 | ||
302 | 173 | backend backend-cached-site2-local | 173 | backend backend-cached-site2-local |
303 | 174 | option forwardfor | ||
304 | 175 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | 174 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
305 | 175 | http-request set-header X-Cache-Request-IP %[src] | ||
306 | 176 | http-request set-header Host site2.local | 176 | http-request set-header Host site2.local |
307 | 177 | balance leastconn | 177 | balance leastconn |
308 | 178 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 | 178 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
309 | 179 | 179 | ||
310 | 180 | backend backend-site2-local | 180 | backend backend-site2-local |
311 | 181 | option redispatch 1 | ||
312 | 182 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | 181 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
313 | 182 | option redispatch 1 | ||
314 | 183 | http-request set-header Host site2.local | 183 | http-request set-header Host site2.local |
315 | 184 | balance leastconn | 184 | balance leastconn |
316 | 185 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 185 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
317 | @@ -187,17 +187,17 @@ backend backend-site2-local | |||
318 | 187 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 187 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
319 | 188 | 188 | ||
320 | 189 | backend backend-cached-site3-local | 189 | backend backend-cached-site3-local |
321 | 190 | option forwardfor | ||
322 | 191 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | 190 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
323 | 191 | http-request set-header X-Cache-Request-IP %[src] | ||
324 | 192 | http-request set-header Host site3.local | 192 | http-request set-header Host site3.local |
325 | 193 | balance leastconn | 193 | balance leastconn |
326 | 194 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 | 194 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
327 | 195 | 195 | ||
328 | 196 | backend backend-site3-local | 196 | backend backend-site3-local |
330 | 197 | option forwardfor except 127.0.0.1 | 197 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
331 | 198 | option forwardfor except 127.0.0.1 192.168.1.1 | ||
332 | 198 | option forceclose | 199 | option forceclose |
333 | 199 | option redispatch 1 | 200 | option redispatch 1 |
334 | 200 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | ||
335 | 201 | http-request set-header Host site3.local | 201 | http-request set-header Host site3.local |
336 | 202 | balance leastconn | 202 | balance leastconn |
337 | 203 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 203 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
338 | @@ -205,92 +205,92 @@ backend backend-site3-local | |||
339 | 205 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 205 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
340 | 206 | 206 | ||
341 | 207 | backend backend-cached-site4-local | 207 | backend backend-cached-site4-local |
342 | 208 | option forwardfor | ||
343 | 209 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk | 208 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
344 | 209 | http-request set-header X-Cache-Request-IP %[src] | ||
345 | 210 | http-request set-header Host site4.local | 210 | http-request set-header Host site4.local |
346 | 211 | balance leastconn | 211 | balance leastconn |
347 | 212 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 | 212 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
348 | 213 | 213 | ||
349 | 214 | backend backend-cached-site5 | 214 | backend backend-cached-site5 |
350 | 215 | option forwardfor | ||
351 | 216 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 215 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
352 | 216 | http-request set-header X-Cache-Request-IP %[src] | ||
353 | 217 | http-request set-header Host site5.local | 217 | http-request set-header Host site5.local |
354 | 218 | balance leastconn | 218 | balance leastconn |
355 | 219 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 | 219 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
356 | 220 | 220 | ||
357 | 221 | backend backend-site5 | 221 | backend backend-site5 |
358 | 222 | option redispatch 1 | ||
359 | 223 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 222 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
360 | 223 | option redispatch 1 | ||
361 | 224 | http-request set-header Host site5.local | 224 | http-request set-header Host site5.local |
362 | 225 | balance leastconn | 225 | balance leastconn |
363 | 226 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 226 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
364 | 227 | 227 | ||
365 | 228 | backend backend-site5-2 | 228 | backend backend-site5-2 |
366 | 229 | option redispatch 1 | ||
367 | 230 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 229 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
368 | 230 | option redispatch 1 | ||
369 | 231 | http-request set-header Host site5.local | 231 | http-request set-header Host site5.local |
370 | 232 | balance leastconn | 232 | balance leastconn |
371 | 233 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 | 233 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
372 | 234 | 234 | ||
373 | 235 | backend backend-cached-site6-local | 235 | backend backend-cached-site6-local |
374 | 236 | option forwardfor | ||
375 | 237 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | 236 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
376 | 237 | http-request set-header X-Cache-Request-IP %[src] | ||
377 | 238 | http-request set-header Host site6.local | 238 | http-request set-header Host site6.local |
378 | 239 | balance leastconn | 239 | balance leastconn |
379 | 240 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 | 240 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
380 | 241 | 241 | ||
381 | 242 | backend backend-site6-local | 242 | backend backend-site6-local |
382 | 243 | option redispatch 1 | ||
383 | 244 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | 243 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
384 | 244 | option redispatch 1 | ||
385 | 245 | http-request set-header Host site6.local | 245 | http-request set-header Host site6.local |
386 | 246 | balance leastconn | 246 | balance leastconn |
387 | 247 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt | 247 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
388 | 248 | 248 | ||
389 | 249 | backend backend-cached-site7-local | 249 | backend backend-cached-site7-local |
390 | 250 | option forwardfor | ||
391 | 251 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | 250 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
392 | 251 | http-request set-header X-Cache-Request-IP %[src] | ||
393 | 252 | http-request set-header Host site7.local | 252 | http-request set-header Host site7.local |
394 | 253 | balance leastconn | 253 | balance leastconn |
395 | 254 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 | 254 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
396 | 255 | 255 | ||
397 | 256 | backend backend-site7-local | 256 | backend backend-site7-local |
398 | 257 | option redispatch 1 | ||
399 | 258 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | 257 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
400 | 258 | option redispatch 1 | ||
401 | 259 | http-request set-header Host site7.local | 259 | http-request set-header Host site7.local |
402 | 260 | balance leastconn | 260 | balance leastconn |
403 | 261 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 261 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
404 | 262 | 262 | ||
405 | 263 | backend backend-cached-site8-local | 263 | backend backend-cached-site8-local |
406 | 264 | option forwardfor | ||
407 | 265 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | 264 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
408 | 265 | http-request set-header X-Cache-Request-IP %[src] | ||
409 | 266 | http-request set-header Host site8.local | 266 | http-request set-header Host site8.local |
410 | 267 | balance leastconn | 267 | balance leastconn |
411 | 268 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 | 268 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
412 | 269 | 269 | ||
413 | 270 | backend backend-site8-local | 270 | backend backend-site8-local |
414 | 271 | option redispatch 1 | ||
415 | 272 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | 271 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
416 | 272 | option redispatch 1 | ||
417 | 273 | http-request set-header Host site8.local | 273 | http-request set-header Host site8.local |
418 | 274 | balance leastconn | 274 | balance leastconn |
419 | 275 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 275 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
420 | 276 | 276 | ||
421 | 277 | backend backend-site8-local-2 | 277 | backend backend-site8-local-2 |
422 | 278 | option redispatch 1 | ||
423 | 279 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk | 278 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
424 | 279 | option redispatch 1 | ||
425 | 280 | http-request set-header Host auth.site8.local | 280 | http-request set-header Host auth.site8.local |
426 | 281 | balance leastconn | 281 | balance leastconn |
427 | 282 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt | 282 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
428 | 283 | 283 | ||
429 | 284 | backend backend-cached-site9-local | 284 | backend backend-cached-site9-local |
430 | 285 | option forwardfor | ||
431 | 286 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | 285 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
432 | 286 | http-request set-header X-Cache-Request-IP %[src] | ||
433 | 287 | http-request set-header Host site9.local | 287 | http-request set-header Host site9.local |
434 | 288 | balance leastconn | 288 | balance leastconn |
435 | 289 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 | 289 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
436 | 290 | 290 | ||
437 | 291 | backend backend-site9-local | 291 | backend backend-site9-local |
438 | 292 | option redispatch 1 | ||
439 | 293 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | 292 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
440 | 293 | option redispatch 1 | ||
441 | 294 | http-request set-header Host site9.local | 294 | http-request set-header Host site9.local |
442 | 295 | balance leastconn | 295 | balance leastconn |
443 | 296 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 | 296 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
444 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt | |||
445 | index aaf84c5..3a80145 100644 | |||
446 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt | |||
447 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_backup.txt | |||
448 | @@ -95,24 +95,24 @@ listen site1-local-2 | |||
449 | 95 | default_backend backend-site1-local-2 | 95 | default_backend backend-site1-local-2 |
450 | 96 | 96 | ||
451 | 97 | backend backend-cached-site1-local | 97 | backend backend-cached-site1-local |
452 | 98 | option forwardfor | ||
453 | 99 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 98 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
454 | 99 | http-request set-header X-Cache-Request-IP %[src] | ||
455 | 100 | http-request set-header Host site1.local | 100 | http-request set-header Host site1.local |
456 | 101 | balance leastconn | 101 | balance leastconn |
457 | 102 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400 | 102 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400 |
458 | 103 | 103 | ||
459 | 104 | backend backend-site1-local | 104 | backend backend-site1-local |
460 | 105 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | ||
461 | 105 | option allbackups | 106 | option allbackups |
462 | 106 | option redispatch 1 | 107 | option redispatch 1 |
463 | 107 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | ||
464 | 108 | http-request set-header Host site1.local | 108 | http-request set-header Host site1.local |
465 | 109 | balance leastconn | 109 | balance leastconn |
466 | 110 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 | 110 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 |
467 | 111 | server server_2 192.168.1.2:8080 backup check inter 5s rise 2 fall 5 maxconn 200 | 111 | server server_2 192.168.1.2:8080 backup check inter 5s rise 2 fall 5 maxconn 200 |
468 | 112 | 112 | ||
469 | 113 | backend backend-site1-local-2 | 113 | backend backend-site1-local-2 |
470 | 114 | option redispatch 1 | ||
471 | 115 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 114 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
472 | 115 | option redispatch 1 | ||
473 | 116 | http-request set-header Host site1.local | 116 | http-request set-header Host site1.local |
474 | 117 | balance leastconn | 117 | balance leastconn |
475 | 118 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 | 118 | server server_1 192.168.1.1:8080 check inter 5s rise 2 fall 5 maxconn 200 |
476 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt | |||
477 | index 29451b9..0d34d81 100644 | |||
478 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt | |||
479 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_load_balancing_algorithm.txt | |||
480 | @@ -155,15 +155,15 @@ listen site9-local | |||
481 | 155 | default_backend backend-site9-local | 155 | default_backend backend-site9-local |
482 | 156 | 156 | ||
483 | 157 | backend backend-cached-site1-local | 157 | backend backend-cached-site1-local |
484 | 158 | option forwardfor | ||
485 | 159 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 158 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
486 | 159 | http-request set-header X-Cache-Request-IP %[src] | ||
487 | 160 | http-request set-header Host site1.local | 160 | http-request set-header Host site1.local |
488 | 161 | balance roundrobin | 161 | balance roundrobin |
489 | 162 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 | 162 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
490 | 163 | 163 | ||
491 | 164 | backend backend-site1-local | 164 | backend backend-site1-local |
492 | 165 | option redispatch 1 | ||
493 | 166 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 165 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
494 | 166 | option redispatch 1 | ||
495 | 167 | http-request set-header Host site1.local | 167 | http-request set-header Host site1.local |
496 | 168 | balance roundrobin | 168 | balance roundrobin |
497 | 169 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 169 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
498 | @@ -171,15 +171,15 @@ backend backend-site1-local | |||
499 | 171 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 171 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
500 | 172 | 172 | ||
501 | 173 | backend backend-cached-site2-local | 173 | backend backend-cached-site2-local |
502 | 174 | option forwardfor | ||
503 | 175 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | 174 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
504 | 175 | http-request set-header X-Cache-Request-IP %[src] | ||
505 | 176 | http-request set-header Host site2.local | 176 | http-request set-header Host site2.local |
506 | 177 | balance roundrobin | 177 | balance roundrobin |
507 | 178 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 | 178 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
508 | 179 | 179 | ||
509 | 180 | backend backend-site2-local | 180 | backend backend-site2-local |
510 | 181 | option redispatch 1 | ||
511 | 182 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | 181 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
512 | 182 | option redispatch 1 | ||
513 | 183 | http-request set-header Host site2.local | 183 | http-request set-header Host site2.local |
514 | 184 | balance roundrobin | 184 | balance roundrobin |
515 | 185 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 185 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
516 | @@ -187,17 +187,17 @@ backend backend-site2-local | |||
517 | 187 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 187 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
518 | 188 | 188 | ||
519 | 189 | backend backend-cached-site3-local | 189 | backend backend-cached-site3-local |
520 | 190 | option forwardfor | ||
521 | 191 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | 190 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
522 | 191 | http-request set-header X-Cache-Request-IP %[src] | ||
523 | 192 | http-request set-header Host site3.local | 192 | http-request set-header Host site3.local |
524 | 193 | balance roundrobin | 193 | balance roundrobin |
525 | 194 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 | 194 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
526 | 195 | 195 | ||
527 | 196 | backend backend-site3-local | 196 | backend backend-site3-local |
529 | 197 | option forwardfor except 127.0.0.1 | 197 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
530 | 198 | option forwardfor except 127.0.0.1 192.168.1.1 | ||
531 | 198 | option forceclose | 199 | option forceclose |
532 | 199 | option redispatch 1 | 200 | option redispatch 1 |
533 | 200 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | ||
534 | 201 | http-request set-header Host site3.local | 201 | http-request set-header Host site3.local |
535 | 202 | balance roundrobin | 202 | balance roundrobin |
536 | 203 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 203 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
537 | @@ -205,92 +205,92 @@ backend backend-site3-local | |||
538 | 205 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 205 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
539 | 206 | 206 | ||
540 | 207 | backend backend-cached-site4-local | 207 | backend backend-cached-site4-local |
541 | 208 | option forwardfor | ||
542 | 209 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk | 208 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
543 | 209 | http-request set-header X-Cache-Request-IP %[src] | ||
544 | 210 | http-request set-header Host site4.local | 210 | http-request set-header Host site4.local |
545 | 211 | balance roundrobin | 211 | balance roundrobin |
546 | 212 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 | 212 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
547 | 213 | 213 | ||
548 | 214 | backend backend-cached-site5 | 214 | backend backend-cached-site5 |
549 | 215 | option forwardfor | ||
550 | 216 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 215 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
551 | 216 | http-request set-header X-Cache-Request-IP %[src] | ||
552 | 217 | http-request set-header Host site5.local | 217 | http-request set-header Host site5.local |
553 | 218 | balance roundrobin | 218 | balance roundrobin |
554 | 219 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 | 219 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
555 | 220 | 220 | ||
556 | 221 | backend backend-site5 | 221 | backend backend-site5 |
557 | 222 | option redispatch 1 | ||
558 | 223 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 222 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
559 | 223 | option redispatch 1 | ||
560 | 224 | http-request set-header Host site5.local | 224 | http-request set-header Host site5.local |
561 | 225 | balance roundrobin | 225 | balance roundrobin |
562 | 226 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 226 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
563 | 227 | 227 | ||
564 | 228 | backend backend-site5-2 | 228 | backend backend-site5-2 |
565 | 229 | option redispatch 1 | ||
566 | 230 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 229 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
567 | 230 | option redispatch 1 | ||
568 | 231 | http-request set-header Host site5.local | 231 | http-request set-header Host site5.local |
569 | 232 | balance roundrobin | 232 | balance roundrobin |
570 | 233 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 | 233 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
571 | 234 | 234 | ||
572 | 235 | backend backend-cached-site6-local | 235 | backend backend-cached-site6-local |
573 | 236 | option forwardfor | ||
574 | 237 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | 236 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
575 | 237 | http-request set-header X-Cache-Request-IP %[src] | ||
576 | 238 | http-request set-header Host site6.local | 238 | http-request set-header Host site6.local |
577 | 239 | balance roundrobin | 239 | balance roundrobin |
578 | 240 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 | 240 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
579 | 241 | 241 | ||
580 | 242 | backend backend-site6-local | 242 | backend backend-site6-local |
581 | 243 | option redispatch 1 | ||
582 | 244 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | 243 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
583 | 244 | option redispatch 1 | ||
584 | 245 | http-request set-header Host site6.local | 245 | http-request set-header Host site6.local |
585 | 246 | balance roundrobin | 246 | balance roundrobin |
586 | 247 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt | 247 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
587 | 248 | 248 | ||
588 | 249 | backend backend-cached-site7-local | 249 | backend backend-cached-site7-local |
589 | 250 | option forwardfor | ||
590 | 251 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | 250 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
591 | 251 | http-request set-header X-Cache-Request-IP %[src] | ||
592 | 252 | http-request set-header Host site7.local | 252 | http-request set-header Host site7.local |
593 | 253 | balance roundrobin | 253 | balance roundrobin |
594 | 254 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 | 254 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
595 | 255 | 255 | ||
596 | 256 | backend backend-site7-local | 256 | backend backend-site7-local |
597 | 257 | option redispatch 1 | ||
598 | 258 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | 257 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
599 | 258 | option redispatch 1 | ||
600 | 259 | http-request set-header Host site7.local | 259 | http-request set-header Host site7.local |
601 | 260 | balance roundrobin | 260 | balance roundrobin |
602 | 261 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 261 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
603 | 262 | 262 | ||
604 | 263 | backend backend-cached-site8-local | 263 | backend backend-cached-site8-local |
605 | 264 | option forwardfor | ||
606 | 265 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | 264 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
607 | 265 | http-request set-header X-Cache-Request-IP %[src] | ||
608 | 266 | http-request set-header Host site8.local | 266 | http-request set-header Host site8.local |
609 | 267 | balance roundrobin | 267 | balance roundrobin |
610 | 268 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 | 268 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
611 | 269 | 269 | ||
612 | 270 | backend backend-site8-local | 270 | backend backend-site8-local |
613 | 271 | option redispatch 1 | ||
614 | 272 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | 271 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
615 | 272 | option redispatch 1 | ||
616 | 273 | http-request set-header Host site8.local | 273 | http-request set-header Host site8.local |
617 | 274 | balance roundrobin | 274 | balance roundrobin |
618 | 275 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 275 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
619 | 276 | 276 | ||
620 | 277 | backend backend-site8-local-2 | 277 | backend backend-site8-local-2 |
621 | 278 | option redispatch 1 | ||
622 | 279 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk | 278 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
623 | 279 | option redispatch 1 | ||
624 | 280 | http-request set-header Host auth.site8.local | 280 | http-request set-header Host auth.site8.local |
625 | 281 | balance roundrobin | 281 | balance roundrobin |
626 | 282 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt | 282 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
627 | 283 | 283 | ||
628 | 284 | backend backend-cached-site9-local | 284 | backend backend-cached-site9-local |
629 | 285 | option forwardfor | ||
630 | 286 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | 285 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
631 | 286 | http-request set-header X-Cache-Request-IP %[src] | ||
632 | 287 | http-request set-header Host site9.local | 287 | http-request set-header Host site9.local |
633 | 288 | balance roundrobin | 288 | balance roundrobin |
634 | 289 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 | 289 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
635 | 290 | 290 | ||
636 | 291 | backend backend-site9-local | 291 | backend backend-site9-local |
637 | 292 | option redispatch 1 | ||
638 | 293 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | 292 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
639 | 293 | option redispatch 1 | ||
640 | 294 | http-request set-header Host site9.local | 294 | http-request set-header Host site9.local |
641 | 295 | balance roundrobin | 295 | balance roundrobin |
642 | 296 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 | 296 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
643 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt | |||
644 | index ea91f8d..5e49b0f 100644 | |||
645 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt | |||
646 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads.txt | |||
647 | @@ -156,15 +156,15 @@ listen site9-local | |||
648 | 156 | default_backend backend-site9-local | 156 | default_backend backend-site9-local |
649 | 157 | 157 | ||
650 | 158 | backend backend-cached-site1-local | 158 | backend backend-cached-site1-local |
651 | 159 | option forwardfor | ||
652 | 160 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 159 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
653 | 160 | http-request set-header X-Cache-Request-IP %[src] | ||
654 | 161 | http-request set-header Host site1.local | 161 | http-request set-header Host site1.local |
655 | 162 | balance leastconn | 162 | balance leastconn |
656 | 163 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 | 163 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
657 | 164 | 164 | ||
658 | 165 | backend backend-site1-local | 165 | backend backend-site1-local |
659 | 166 | option redispatch 1 | ||
660 | 167 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 166 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
661 | 167 | option redispatch 1 | ||
662 | 168 | http-request set-header Host site1.local | 168 | http-request set-header Host site1.local |
663 | 169 | balance leastconn | 169 | balance leastconn |
664 | 170 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 170 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
665 | @@ -172,15 +172,15 @@ backend backend-site1-local | |||
666 | 172 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 172 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
667 | 173 | 173 | ||
668 | 174 | backend backend-cached-site2-local | 174 | backend backend-cached-site2-local |
669 | 175 | option forwardfor | ||
670 | 176 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | 175 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
671 | 176 | http-request set-header X-Cache-Request-IP %[src] | ||
672 | 177 | http-request set-header Host site2.local | 177 | http-request set-header Host site2.local |
673 | 178 | balance leastconn | 178 | balance leastconn |
674 | 179 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 | 179 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
675 | 180 | 180 | ||
676 | 181 | backend backend-site2-local | 181 | backend backend-site2-local |
677 | 182 | option redispatch 1 | ||
678 | 183 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | 182 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
679 | 183 | option redispatch 1 | ||
680 | 184 | http-request set-header Host site2.local | 184 | http-request set-header Host site2.local |
681 | 185 | balance leastconn | 185 | balance leastconn |
682 | 186 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 186 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
683 | @@ -188,17 +188,17 @@ backend backend-site2-local | |||
684 | 188 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 188 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
685 | 189 | 189 | ||
686 | 190 | backend backend-cached-site3-local | 190 | backend backend-cached-site3-local |
687 | 191 | option forwardfor | ||
688 | 192 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | 191 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
689 | 192 | http-request set-header X-Cache-Request-IP %[src] | ||
690 | 193 | http-request set-header Host site3.local | 193 | http-request set-header Host site3.local |
691 | 194 | balance leastconn | 194 | balance leastconn |
692 | 195 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 | 195 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
693 | 196 | 196 | ||
694 | 197 | backend backend-site3-local | 197 | backend backend-site3-local |
696 | 198 | option forwardfor except 127.0.0.1 | 198 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
697 | 199 | option forwardfor except 127.0.0.1 192.168.1.1 | ||
698 | 199 | option forceclose | 200 | option forceclose |
699 | 200 | option redispatch 1 | 201 | option redispatch 1 |
700 | 201 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | ||
701 | 202 | http-request set-header Host site3.local | 202 | http-request set-header Host site3.local |
702 | 203 | balance leastconn | 203 | balance leastconn |
703 | 204 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 204 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
704 | @@ -206,92 +206,92 @@ backend backend-site3-local | |||
705 | 206 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 206 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
706 | 207 | 207 | ||
707 | 208 | backend backend-cached-site4-local | 208 | backend backend-cached-site4-local |
708 | 209 | option forwardfor | ||
709 | 210 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk | 209 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
710 | 210 | http-request set-header X-Cache-Request-IP %[src] | ||
711 | 211 | http-request set-header Host site4.local | 211 | http-request set-header Host site4.local |
712 | 212 | balance leastconn | 212 | balance leastconn |
713 | 213 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 | 213 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
714 | 214 | 214 | ||
715 | 215 | backend backend-cached-site5 | 215 | backend backend-cached-site5 |
716 | 216 | option forwardfor | ||
717 | 217 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 216 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
718 | 217 | http-request set-header X-Cache-Request-IP %[src] | ||
719 | 218 | http-request set-header Host site5.local | 218 | http-request set-header Host site5.local |
720 | 219 | balance leastconn | 219 | balance leastconn |
721 | 220 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 | 220 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
722 | 221 | 221 | ||
723 | 222 | backend backend-site5 | 222 | backend backend-site5 |
724 | 223 | option redispatch 1 | ||
725 | 224 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 223 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
726 | 224 | option redispatch 1 | ||
727 | 225 | http-request set-header Host site5.local | 225 | http-request set-header Host site5.local |
728 | 226 | balance leastconn | 226 | balance leastconn |
729 | 227 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 227 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
730 | 228 | 228 | ||
731 | 229 | backend backend-site5-2 | 229 | backend backend-site5-2 |
732 | 230 | option redispatch 1 | ||
733 | 231 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 230 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
734 | 231 | option redispatch 1 | ||
735 | 232 | http-request set-header Host site5.local | 232 | http-request set-header Host site5.local |
736 | 233 | balance leastconn | 233 | balance leastconn |
737 | 234 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 | 234 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
738 | 235 | 235 | ||
739 | 236 | backend backend-cached-site6-local | 236 | backend backend-cached-site6-local |
740 | 237 | option forwardfor | ||
741 | 238 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | 237 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
742 | 238 | http-request set-header X-Cache-Request-IP %[src] | ||
743 | 239 | http-request set-header Host site6.local | 239 | http-request set-header Host site6.local |
744 | 240 | balance leastconn | 240 | balance leastconn |
745 | 241 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 | 241 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
746 | 242 | 242 | ||
747 | 243 | backend backend-site6-local | 243 | backend backend-site6-local |
748 | 244 | option redispatch 1 | ||
749 | 245 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | 244 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
750 | 245 | option redispatch 1 | ||
751 | 246 | http-request set-header Host site6.local | 246 | http-request set-header Host site6.local |
752 | 247 | balance leastconn | 247 | balance leastconn |
753 | 248 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt | 248 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
754 | 249 | 249 | ||
755 | 250 | backend backend-cached-site7-local | 250 | backend backend-cached-site7-local |
756 | 251 | option forwardfor | ||
757 | 252 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | 251 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
758 | 252 | http-request set-header X-Cache-Request-IP %[src] | ||
759 | 253 | http-request set-header Host site7.local | 253 | http-request set-header Host site7.local |
760 | 254 | balance leastconn | 254 | balance leastconn |
761 | 255 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 | 255 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
762 | 256 | 256 | ||
763 | 257 | backend backend-site7-local | 257 | backend backend-site7-local |
764 | 258 | option redispatch 1 | ||
765 | 259 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | 258 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
766 | 259 | option redispatch 1 | ||
767 | 260 | http-request set-header Host site7.local | 260 | http-request set-header Host site7.local |
768 | 261 | balance leastconn | 261 | balance leastconn |
769 | 262 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 262 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
770 | 263 | 263 | ||
771 | 264 | backend backend-cached-site8-local | 264 | backend backend-cached-site8-local |
772 | 265 | option forwardfor | ||
773 | 266 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | 265 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
774 | 266 | http-request set-header X-Cache-Request-IP %[src] | ||
775 | 267 | http-request set-header Host site8.local | 267 | http-request set-header Host site8.local |
776 | 268 | balance leastconn | 268 | balance leastconn |
777 | 269 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 | 269 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
778 | 270 | 270 | ||
779 | 271 | backend backend-site8-local | 271 | backend backend-site8-local |
780 | 272 | option redispatch 1 | ||
781 | 273 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | 272 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
782 | 273 | option redispatch 1 | ||
783 | 274 | http-request set-header Host site8.local | 274 | http-request set-header Host site8.local |
784 | 275 | balance leastconn | 275 | balance leastconn |
785 | 276 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 276 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
786 | 277 | 277 | ||
787 | 278 | backend backend-site8-local-2 | 278 | backend backend-site8-local-2 |
788 | 279 | option redispatch 1 | ||
789 | 280 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk | 279 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk |
790 | 280 | option redispatch 1 | ||
791 | 281 | http-request set-header Host auth.site8.local | 281 | http-request set-header Host auth.site8.local |
792 | 282 | balance leastconn | 282 | balance leastconn |
793 | 283 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt | 283 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
794 | 284 | 284 | ||
795 | 285 | backend backend-cached-site9-local | 285 | backend backend-cached-site9-local |
796 | 286 | option forwardfor | ||
797 | 287 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | 286 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
798 | 287 | http-request set-header X-Cache-Request-IP %[src] | ||
799 | 288 | http-request set-header Host site9.local | 288 | http-request set-header Host site9.local |
800 | 289 | balance leastconn | 289 | balance leastconn |
801 | 290 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 | 290 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
802 | 291 | 291 | ||
803 | 292 | backend backend-site9-local | 292 | backend backend-site9-local |
804 | 293 | option redispatch 1 | ||
805 | 294 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | 293 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
806 | 294 | option redispatch 1 | ||
807 | 295 | http-request set-header Host site9.local | 295 | http-request set-header Host site9.local |
808 | 296 | balance leastconn | 296 | balance leastconn |
809 | 297 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 | 297 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
810 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt | |||
811 | index ef0a365..8cdfd8d 100644 | |||
812 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt | |||
813 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_processes_and_threads_haproxy2.txt | |||
814 | @@ -155,16 +155,16 @@ listen site9-local | |||
815 | 155 | default_backend backend-site9-local | 155 | default_backend backend-site9-local |
816 | 156 | 156 | ||
817 | 157 | backend backend-cached-site1-local | 157 | backend backend-cached-site1-local |
818 | 158 | option forwardfor | ||
819 | 159 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 158 | option httpchk HEAD /?token=1861920000_f3e404e205ed44749e942d481f7a7bec57c5e78a HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
820 | 159 | http-request set-header X-Cache-Request-IP %[src] | ||
821 | 160 | http-request set-header Host site1.local | 160 | http-request set-header Host site1.local |
822 | 161 | balance leastconn | 161 | balance leastconn |
823 | 162 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 | 162 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 600 |
824 | 163 | 163 | ||
825 | 164 | backend backend-site1-local | 164 | backend backend-site1-local |
826 | 165 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | ||
827 | 165 | retry-on all-retryable-errors | 166 | retry-on all-retryable-errors |
828 | 166 | option redispatch 1 | 167 | option redispatch 1 |
829 | 167 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | ||
830 | 168 | http-request set-header Host site1.local | 168 | http-request set-header Host site1.local |
831 | 169 | balance leastconn | 169 | balance leastconn |
832 | 170 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 170 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
833 | @@ -172,16 +172,16 @@ backend backend-site1-local | |||
834 | 172 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 172 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
835 | 173 | 173 | ||
836 | 174 | backend backend-cached-site2-local | 174 | backend backend-cached-site2-local |
837 | 175 | option forwardfor | ||
838 | 176 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | 175 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk |
839 | 176 | http-request set-header X-Cache-Request-IP %[src] | ||
840 | 177 | http-request set-header Host site2.local | 177 | http-request set-header Host site2.local |
841 | 178 | balance leastconn | 178 | balance leastconn |
842 | 179 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 | 179 | server server_1 127.0.0.1:6081 check inter 2s rise 2 fall 60 maxconn 3072 |
843 | 180 | 180 | ||
844 | 181 | backend backend-site2-local | 181 | backend backend-site2-local |
845 | 182 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | ||
846 | 182 | retry-on all-retryable-errors | 183 | retry-on all-retryable-errors |
847 | 183 | option redispatch 1 | 184 | option redispatch 1 |
848 | 184 | option httpchk GET /check/ HTTP/1.0\r\nHost:\ site2.local\r\nUser-Agent:\ haproxy/httpchk | ||
849 | 185 | http-request set-header Host site2.local | 185 | http-request set-header Host site2.local |
850 | 186 | balance leastconn | 186 | balance leastconn |
851 | 187 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 187 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
852 | @@ -189,18 +189,18 @@ backend backend-site2-local | |||
853 | 189 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 189 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
854 | 190 | 190 | ||
855 | 191 | backend backend-cached-site3-local | 191 | backend backend-cached-site3-local |
856 | 192 | option forwardfor | ||
857 | 193 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | 192 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
858 | 193 | http-request set-header X-Cache-Request-IP %[src] | ||
859 | 194 | http-request set-header Host site3.local | 194 | http-request set-header Host site3.local |
860 | 195 | balance leastconn | 195 | balance leastconn |
861 | 196 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 | 196 | server server_1 127.0.0.1:6082 check inter 2s rise 2 fall 60 maxconn 4096 |
862 | 197 | 197 | ||
863 | 198 | backend backend-site3-local | 198 | backend backend-site3-local |
865 | 199 | option forwardfor except 127.0.0.1 | 199 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
866 | 200 | option forwardfor except 127.0.0.1 192.168.1.1 | ||
867 | 200 | option forceclose | 201 | option forceclose |
868 | 201 | retry-on all-retryable-errors | 202 | retry-on all-retryable-errors |
869 | 202 | option redispatch 1 | 203 | option redispatch 1 |
870 | 203 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | ||
871 | 204 | http-request set-header Host site3.local | 204 | http-request set-header Host site3.local |
872 | 205 | balance leastconn | 205 | balance leastconn |
873 | 206 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 206 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
874 | @@ -208,99 +208,99 @@ backend backend-site3-local | |||
875 | 208 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 | 208 | server server_3 127.0.1.12:80 check inter 5s rise 2 fall 5 maxconn 200 |
876 | 209 | 209 | ||
877 | 210 | backend backend-cached-site4-local | 210 | backend backend-cached-site4-local |
878 | 211 | option forwardfor | ||
879 | 212 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk | 211 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site4.local\r\nUser-Agent:\ haproxy/httpchk |
880 | 212 | http-request set-header X-Cache-Request-IP %[src] | ||
881 | 213 | http-request set-header Host site4.local | 213 | http-request set-header Host site4.local |
882 | 214 | balance leastconn | 214 | balance leastconn |
883 | 215 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 | 215 | server server_1 127.0.0.1:6083 check inter 2s rise 2 fall 60 maxconn 200 |
884 | 216 | 216 | ||
885 | 217 | backend backend-cached-site5 | 217 | backend backend-cached-site5 |
886 | 218 | option forwardfor | ||
887 | 219 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | 218 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk |
888 | 219 | http-request set-header X-Cache-Request-IP %[src] | ||
889 | 220 | http-request set-header Host site5.local | 220 | http-request set-header Host site5.local |
890 | 221 | balance leastconn | 221 | balance leastconn |
891 | 222 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 | 222 | server server_1 127.0.0.1:6084 check inter 2s rise 2 fall 60 maxconn 200 |
892 | 223 | 223 | ||
893 | 224 | backend backend-site5 | 224 | backend backend-site5 |
894 | 225 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | ||
895 | 225 | retry-on all-retryable-errors | 226 | retry-on all-retryable-errors |
896 | 226 | option redispatch 1 | 227 | option redispatch 1 |
897 | 227 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | ||
898 | 228 | http-request set-header Host site5.local | 228 | http-request set-header Host site5.local |
899 | 229 | balance leastconn | 229 | balance leastconn |
900 | 230 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 230 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
901 | 231 | 231 | ||
902 | 232 | backend backend-site5-2 | 232 | backend backend-site5-2 |
903 | 233 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | ||
904 | 233 | retry-on all-retryable-errors | 234 | retry-on all-retryable-errors |
905 | 234 | option redispatch 1 | 235 | option redispatch 1 |
906 | 235 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site5.local\r\nUser-Agent:\ haproxy/httpchk | ||
907 | 236 | http-request set-header Host site5.local | 236 | http-request set-header Host site5.local |
908 | 237 | balance leastconn | 237 | balance leastconn |
909 | 238 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 | 238 | server server_1 127.0.1.11:80 check inter 5s rise 2 fall 5 maxconn 200 |
910 | 239 | 239 | ||
911 | 240 | backend backend-cached-site6-local | 240 | backend backend-cached-site6-local |
912 | 241 | option forwardfor | ||
913 | 242 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | 241 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk |
914 | 242 | http-request set-header X-Cache-Request-IP %[src] | ||
915 | 243 | http-request set-header Host site6.local | 243 | http-request set-header Host site6.local |
916 | 244 | balance leastconn | 244 | balance leastconn |
917 | 245 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 | 245 | server server_1 127.0.0.1:6085 check inter 2s rise 2 fall 60 maxconn 200 |
918 | 246 | 246 | ||
919 | 247 | backend backend-site6-local | 247 | backend backend-site6-local |
920 | 248 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | ||
921 | 248 | retry-on all-retryable-errors | 249 | retry-on all-retryable-errors |
922 | 249 | option redispatch 1 | 250 | option redispatch 1 |
923 | 250 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site6.local\r\nUser-Agent:\ haproxy/httpchk | ||
924 | 251 | http-request set-header Host site6.local | 251 | http-request set-header Host site6.local |
925 | 252 | balance leastconn | 252 | balance leastconn |
926 | 253 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt | 253 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(site6.local) check-sni site6.local verify required ca-file ca-certificates.crt |
927 | 254 | 254 | ||
928 | 255 | backend backend-cached-site7-local | 255 | backend backend-cached-site7-local |
929 | 256 | option forwardfor | ||
930 | 257 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | 256 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk |
931 | 257 | http-request set-header X-Cache-Request-IP %[src] | ||
932 | 258 | http-request set-header Host site7.local | 258 | http-request set-header Host site7.local |
933 | 259 | balance leastconn | 259 | balance leastconn |
934 | 260 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 | 260 | server server_1 127.0.0.1:6086 check inter 2s rise 2 fall 60 maxconn 200 |
935 | 261 | 261 | ||
936 | 262 | backend backend-site7-local | 262 | backend backend-site7-local |
937 | 263 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | ||
938 | 263 | retry-on all-retryable-errors | 264 | retry-on all-retryable-errors |
939 | 264 | option redispatch 1 | 265 | option redispatch 1 |
940 | 265 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site7.local\r\nUser-Agent:\ haproxy/httpchk | ||
941 | 266 | http-request set-header Host site7.local | 266 | http-request set-header Host site7.local |
942 | 267 | balance leastconn | 267 | balance leastconn |
943 | 268 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 268 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
944 | 269 | 269 | ||
945 | 270 | backend backend-cached-site8-local | 270 | backend backend-cached-site8-local |
946 | 271 | option forwardfor | ||
947 | 272 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | 271 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk |
948 | 272 | http-request set-header X-Cache-Request-IP %[src] | ||
949 | 273 | http-request set-header Host site8.local | 273 | http-request set-header Host site8.local |
950 | 274 | balance leastconn | 274 | balance leastconn |
951 | 275 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 | 275 | server server_1 127.0.0.1:6087 check inter 2s rise 2 fall 60 maxconn 200 |
952 | 276 | 276 | ||
953 | 277 | backend backend-site8-local | 277 | backend backend-site8-local |
954 | 278 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | ||
955 | 278 | retry-on all-retryable-errors | 279 | retry-on all-retryable-errors |
956 | 279 | option redispatch 1 | 280 | option redispatch 1 |
957 | 280 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site8.local\r\nUser-Agent:\ haproxy/httpchk | ||
958 | 281 | http-request set-header Host site8.local | 281 | http-request set-header Host site8.local |
959 | 282 | balance leastconn | 282 | balance leastconn |
960 | 283 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 283 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
961 | 284 | 284 | ||
962 | 285 | backend backend-site8-local-2 | 285 | backend backend-site8-local-2 |
963 | 286 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk | ||
964 | 286 | retry-on all-retryable-errors | 287 | retry-on all-retryable-errors |
965 | 287 | option redispatch 1 | 288 | option redispatch 1 |
966 | 288 | option httpchk HEAD / HTTP/1.0\r\nHost:\ auth.site8.local\r\nUser-Agent:\ haproxy/httpchk | ||
967 | 289 | http-request set-header Host auth.site8.local | 289 | http-request set-header Host auth.site8.local |
968 | 290 | balance leastconn | 290 | balance leastconn |
969 | 291 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt | 291 | server server_1 127.0.1.10:443 check inter 5s rise 2 fall 5 maxconn 200 ssl sni str(auth.site8.local) check-sni auth.site8.local verify required ca-file ca-certificates.crt |
970 | 292 | 292 | ||
971 | 293 | backend backend-cached-site9-local | 293 | backend backend-cached-site9-local |
972 | 294 | option forwardfor | ||
973 | 295 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | 294 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk |
974 | 295 | http-request set-header X-Cache-Request-IP %[src] | ||
975 | 296 | http-request set-header Host site9.local | 296 | http-request set-header Host site9.local |
976 | 297 | balance leastconn | 297 | balance leastconn |
977 | 298 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 | 298 | server server_1 127.0.0.1:6088 check inter 2s rise 2 fall 60 maxconn 200 |
978 | 299 | 299 | ||
979 | 300 | backend backend-site9-local | 300 | backend backend-site9-local |
980 | 301 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | ||
981 | 301 | retry-on all-retryable-errors | 302 | retry-on all-retryable-errors |
982 | 302 | option redispatch 1 | 303 | option redispatch 1 |
983 | 303 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site9.local\r\nUser-Agent:\ haproxy/httpchk | ||
984 | 304 | http-request set-header Host site9.local | 304 | http-request set-header Host site9.local |
985 | 305 | balance leastconn | 305 | balance leastconn |
986 | 306 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 | 306 | server server_1 127.0.1.15:80 check inter 1m rise 2 fall 5 maxconn 200 |
987 | diff --git a/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt b/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt | |||
988 | index 8d97a65..150724d 100644 | |||
989 | --- a/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt | |||
990 | +++ b/tests/unit/files/content_cache_rendered_haproxy_test_output_srv_template.txt | |||
991 | @@ -90,15 +90,15 @@ listen site1-local | |||
992 | 90 | default_backend backend-site1-local | 90 | default_backend backend-site1-local |
993 | 91 | 91 | ||
994 | 92 | backend backend-cached-site1-local | 92 | backend backend-cached-site1-local |
995 | 93 | option forwardfor | ||
996 | 94 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 93 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
997 | 94 | http-request set-header X-Cache-Request-IP %[src] | ||
998 | 95 | http-request set-header Host site1.local | 95 | http-request set-header Host site1.local |
999 | 96 | balance leastconn | 96 | balance leastconn |
1000 | 97 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400 | 97 | server server_1 127.0.0.1:6080 check inter 2s rise 2 fall 60 maxconn 400 |
1001 | 98 | 98 | ||
1002 | 99 | backend backend-site1-local | 99 | backend backend-site1-local |
1003 | 100 | option redispatch 1 | ||
1004 | 101 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk | 100 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site1.local\r\nUser-Agent:\ haproxy/httpchk |
1005 | 101 | option redispatch 1 | ||
1006 | 102 | http-request set-header Host site1.local | 102 | http-request set-header Host site1.local |
1007 | 103 | balance leastconn | 103 | balance leastconn |
1008 | 104 | server-template server_1_ 2 _http._tcp.us.archive.ubuntu.com:80 resolvers dns init-addr last,libc,none check inter 5s rise 2 fall 5 maxconn 200 | 104 | server-template server_1_ 2 _http._tcp.us.archive.ubuntu.com:80 resolvers dns init-addr last,libc,none check inter 5s rise 2 fall 5 maxconn 200 |
1009 | diff --git a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt | |||
1010 | index 247c97d..ea47e02 100644 | |||
1011 | --- a/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt | |||
1012 | +++ b/tests/unit/files/haproxy_config_rendered_backends_stanzas_test_output.txt | |||
1013 | @@ -16,9 +16,9 @@ backend backend-site2-local | |||
1014 | 16 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 16 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1015 | 17 | 17 | ||
1016 | 18 | backend backend-site3-local | 18 | backend backend-site3-local |
1017 | 19 | option forwardfor except 127.0.0.1 | ||
1018 | 20 | option forceclose | ||
1019 | 21 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | 19 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
1020 | 20 | option forwardfor except 127.0.0.1 192.168.1.1 | ||
1021 | 21 | option forceclose | ||
1022 | 22 | http-request set-header Host site3.local | 22 | http-request set-header Host site3.local |
1023 | 23 | balance leastconn | 23 | balance leastconn |
1024 | 24 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 24 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1025 | diff --git a/tests/unit/files/haproxy_config_rendered_test_output.txt b/tests/unit/files/haproxy_config_rendered_test_output.txt | |||
1026 | index 290d918..1b15c14 100644 | |||
1027 | --- a/tests/unit/files/haproxy_config_rendered_test_output.txt | |||
1028 | +++ b/tests/unit/files/haproxy_config_rendered_test_output.txt | |||
1029 | @@ -122,9 +122,9 @@ backend backend-site2-local | |||
1030 | 122 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 122 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1031 | 123 | 123 | ||
1032 | 124 | backend backend-site3-local | 124 | backend backend-site3-local |
1033 | 125 | option forwardfor except 127.0.0.1 | ||
1034 | 126 | option forceclose | ||
1035 | 127 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | 125 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
1036 | 126 | option forwardfor except 127.0.0.1 192.168.1.1 | ||
1037 | 127 | option forceclose | ||
1038 | 128 | http-request set-header Host site3.local | 128 | http-request set-header Host site3.local |
1039 | 129 | balance leastconn | 129 | balance leastconn |
1040 | 130 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 130 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
1041 | diff --git a/tests/unit/files/haproxy_config_rendered_test_output2.txt b/tests/unit/files/haproxy_config_rendered_test_output2.txt | |||
1042 | index 7489f26..1009f68 100644 | |||
1043 | --- a/tests/unit/files/haproxy_config_rendered_test_output2.txt | |||
1044 | +++ b/tests/unit/files/haproxy_config_rendered_test_output2.txt | |||
1045 | @@ -122,9 +122,9 @@ backend backend-site2-local | |||
1046 | 122 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt | 122 | server server_3 127.0.1.12:443 check inter 5s rise 2 fall 5 maxconn 1024 ssl sni str(site2.local) check-sni site2.local verify required ca-file ca-certificates.crt |
1047 | 123 | 123 | ||
1048 | 124 | backend backend-site3-local | 124 | backend backend-site3-local |
1049 | 125 | option forwardfor except 127.0.0.1 | ||
1050 | 126 | option forceclose | ||
1051 | 127 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk | 125 | option httpchk HEAD / HTTP/1.0\r\nHost:\ site3.local\r\nUser-Agent:\ haproxy/httpchk |
1052 | 126 | option forwardfor except 127.0.0.1 192.168.1.1 | ||
1053 | 127 | option forceclose | ||
1054 | 128 | http-request set-header Host site3.local | 128 | http-request set-header Host site3.local |
1055 | 129 | balance leastconn | 129 | balance leastconn |
1056 | 130 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 | 130 | server server_1 127.0.1.10:80 check inter 5s rise 2 fall 5 maxconn 200 |
A real fix is to set a new header with the client's IP and update Nginx to log that. I'll do that in another MP.