From c5220944d2acdb912c129fc82ac8a83d24e9845d Mon Sep 17 00:00:00 2001 From: Zhidao HONG Date: Thu, 30 Sep 2021 22:17:28 +0800 Subject: Static: variables in the "share" option. This commit supports variable in the "share" option, the finding path to file serve is the value from "share". An example: { "share": "/www/data/static$uri" } --- test/test_static.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/test_static.py') diff --git a/test/test_static.py b/test/test_static.py index 669e265d..fa0a81a2 100644 --- a/test/test_static.py +++ b/test/test_static.py @@ -28,7 +28,9 @@ class TestStatic(TestApplicationProto): self._load_conf( { "listeners": {"*:7080": {"pass": "routes"}}, - "routes": [{"action": {"share": option.temp_dir + "/assets"}}], + "routes": [ + {"action": {"share": option.temp_dir + "/assets$uri"}} + ], "settings": { "http": { "static": { -- cgit