aboutsummaryrefslogtreecommitdiffhomepage
path: root/caddytest
diff options
context:
space:
mode:
authorJesper Brix Rosenkilde <[email protected]>2024-08-19 18:55:55 +0200
committerGitHub <[email protected]>2024-08-19 10:55:55 -0600
commit54a0c8f94821f393edec1a1bc9459f2363c95117 (patch)
tree2b00fcec797f6cc05680300346a2154d9fa0ab05 /caddytest
parent043fe41ab8d39615f346b63c1e51bcf16feda1d8 (diff)
downloadcaddy-54a0c8f94821f393edec1a1bc9459f2363c95117.tar.gz
caddy-54a0c8f94821f393edec1a1bc9459f2363c95117.zip
reverseproxy: Active health checks request body option (#6520)
* Add an option to specify the body used for active health checks * Replacer on request body
Diffstat (limited to 'caddytest')
-rw-r--r--caddytest/integration/caddyfile_adapt/reverse_proxy_health_reqbody.caddyfiletest40
1 files changed, 40 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/reverse_proxy_health_reqbody.caddyfiletest b/caddytest/integration/caddyfile_adapt/reverse_proxy_health_reqbody.caddyfiletest
new file mode 100644
index 000000000..ae5a6791e
--- /dev/null
+++ b/caddytest/integration/caddyfile_adapt/reverse_proxy_health_reqbody.caddyfiletest
@@ -0,0 +1,40 @@
+:8884
+
+reverse_proxy 127.0.0.1:65535 {
+ health_uri /health
+ health_request_body "test body"
+}
+----------
+{
+ "apps": {
+ "http": {
+ "servers": {
+ "srv0": {
+ "listen": [
+ ":8884"
+ ],
+ "routes": [
+ {
+ "handle": [
+ {
+ "handler": "reverse_proxy",
+ "health_checks": {
+ "active": {
+ "body": "test body",
+ "uri": "/health"
+ }
+ },
+ "upstreams": [
+ {
+ "dial": "127.0.0.1:65535"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ }
+}