This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Commit 149c3db
committed
Add domain specific matching for haproxy config
I ran into trouble getting federation working properly with the haproxy config specified here. After some debugging, I discovered that many federation HTTP requests, including the ones sent by the [federation tester](https://federationtester.matrix.org/), include the port number in the HTTP Host header field. For example, instead of `Host: matrix.example.com`, these federation requests look like `Host: matrix.example.com:443`. At least on haproxy 2.3, the extra port information causes the `acl matrix-host hdr(host) -i matrix.example.com` match to fail, since this is looking for an exact string match by default according to the [haproxy docs](http://cbonte.github.io/haproxy-dconv/2.3/configuration.html#7.1). This failure, in turn, causes haproxy to return error codes and causes federation to fail. Using `hdr_dom(host)`, which ignores the port information, fixes the issue in my setup.
Signed-off-by: Brett Bethke <10068296+bb4242@users.noreply.github.com>1 parent 0dd0c40 commit 149c3db
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
0 commit comments