Mark Lamourine | c2247f0 | 2012-01-04 13:02:01 -0500 | [diff] [blame] | 1 | # Test Rewriting Host header |
| 2 | global |
| 3 | maxconn 100 |
| 4 | |
| 5 | defaults |
| 6 | mode http |
| 7 | timeout client 10000 |
| 8 | timeout server 10000 |
| 9 | timeout connect 10000 |
| 10 | balance roundrobin |
| 11 | |
| 12 | listen send-name-silo-id |
| 13 | bind :8001 |
| 14 | |
| 15 | # Set the test conditions: Add a new header |
| 16 | http-send-name-header X-Silo-Id |
| 17 | server srv-silo1 127.0.0.1:8080 |
| 18 | |
| 19 | # Add headers containing the correct values for test verification |
Willy Tarreau | d4359fd | 2021-04-02 10:49:34 +0200 | [diff] [blame] | 20 | http-request add-header X-test-server-name-header X-Silo-Id |
| 21 | http-request add-header X-test-server-name-value srv-silo1 |
Mark Lamourine | c2247f0 | 2012-01-04 13:02:01 -0500 | [diff] [blame] | 22 | |
| 23 | listen send-name-host |
| 24 | bind :8002 |
| 25 | |
| 26 | # Set the test conditions: Replace an existing header |
| 27 | http-send-name-header host |
| 28 | server srv-host 127.0.0.1:8080 |
| 29 | |
| 30 | # Add headers containing the correct values for test verification |
Willy Tarreau | d4359fd | 2021-04-02 10:49:34 +0200 | [diff] [blame] | 31 | http-request add-header X-test-server-name-header Host |
| 32 | http-request add-header X-test-server-name-value srv-host |
Mark Lamourine | c2247f0 | 2012-01-04 13:02:01 -0500 | [diff] [blame] | 33 | |