From 670b723e3802ac37942dad07dc194539bccce9ff Mon Sep 17 00:00:00 2001 From: Nicola Piccinini Date: Mon, 16 Nov 2020 19:43:39 +0100 Subject: requestbody: Add Caddyfile support (#3859) * Add Caddyfile support for request_body: ``` request_body { max_size 10000000 } ``` * Improve Caddyfile parser for request_body module * Remove unnecessary `continue` * Add sample for caddyfile_adapt_test --- .../integration/caddyfile_adapt/request_body.txt | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 caddytest/integration/caddyfile_adapt/request_body.txt (limited to 'caddytest') diff --git a/caddytest/integration/caddyfile_adapt/request_body.txt b/caddytest/integration/caddyfile_adapt/request_body.txt new file mode 100644 index 0000000..458b739 --- /dev/null +++ b/caddytest/integration/caddyfile_adapt/request_body.txt @@ -0,0 +1,45 @@ +localhost +request_body { + max_size 1MB +} +---------- +{ + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":443" + ], + "routes": [ + { + "match": [ + { + "host": [ + "localhost" + ] + } + ], + "handle": [ + { + "handler": "subroute", + "routes": [ + { + "handle": [ + { + "handler": "request_body", + "max_size": 1000000 + } + ] + } + ] + } + ], + "terminal": true + } + ] + } + } + } + } +} \ No newline at end of file -- cgit v1.2.3