Willy Tarreau | d4359fd | 2021-04-02 10:49:34 +0200 | [diff] [blame] | 1 | global |
| 2 | maxconn 100 |
| 3 | lua-load setstatus.lua |
| 4 | |
| 5 | defaults |
| 6 | mode http |
| 7 | timeout client 10000 |
| 8 | timeout server 10000 |
| 9 | timeout connect 10000 |
| 10 | |
| 11 | # Expect HTTP/1.1 418 I'm a teapot |
| 12 | listen lua-service-set-status-defaultreason |
| 13 | bind :8003 |
| 14 | http-request use-service lua.http418-default |
| 15 | |
| 16 | # Expect HTTP/1.1 418 I'm a coffeepot |
| 17 | listen lua-service-set-status-customreason |
| 18 | bind :8004 |
| 19 | http-request use-service lua.http418-coffeepot |
| 20 | |
| 21 | # Expect HTTP/1.1 418 I'm a teapot |
| 22 | listen lua-action-set-status-defaultreason |
| 23 | bind :8005 |
| 24 | http-response lua.set-status-418-defaultreason |
| 25 | server host 127.0.0.1:8080 |
| 26 | |
| 27 | # Expect HTTP/1.1 418 I'm a coffeepot |
| 28 | listen lua-action-set-status-customreason |
| 29 | bind :8006 |
| 30 | http-response lua.set-status-418-customreason |
| 31 | server host 127.0.0.1:8080 |