Skip to content

Commit d63711c

Browse files
committed
Ensure consistent captured headers, between all HTTP request processing HAProxy frontends.
We can't do this in `defaults` as the Prometheus frontend has `no log`.
1 parent 9d19742 commit d63711c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

charts/matrix-stack/configs/synapse/partial-haproxy.cfg.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ frontend startup
2222
frontend synapse-http-in
2323
bind *:8008
2424

25-
# same as http log, with %Th (handshake time)
26-
log-format "%ci:%cp [%tr] %ft %b/%s %Th/%TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
27-
2825
# if we hit the maxconn on a server, and the queue timeout expires, we want
2926
# to avoid returning 503, since that will cause cloudflare to mark us down.
3027
#
@@ -35,6 +32,9 @@ frontend synapse-http-in
3532
#
3633
errorfile 503 /synapse/429.http
3734

35+
# same as http log, with %Th (handshake time)
36+
log-format "%ci:%cp [%tr] %ft %b/%s %Th/%TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
37+
3838
capture request header Host len 32
3939
capture request header Referer len 200
4040
capture request header User-Agent len 200

charts/matrix-stack/configs/well-known/partial-haproxy.cfg.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ frontend well-known-in
1313
# same as http log, with %Th (handshake time)
1414
log-format "%ci:%cp [%tr] %ft %b/%s %Th/%TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
1515

16+
capture request header Host len 32
17+
capture request header Referer len 200
18+
capture request header User-Agent len 200
19+
1620
acl is_delete_put_post_method method DELETE POST PUT
1721
http-request deny status 405 if is_delete_put_post_method
1822

newsfragments/788.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ensure consistent captured headers in HAProxy log lines, between all HTTP request processing HAProxy frontends.

0 commit comments

Comments
 (0)