diff options
author | Zhidao HONG <z.hong@f5.com> | 2021-09-30 22:17:28 +0800 |
---|---|---|
committer | Zhidao HONG <z.hong@f5.com> | 2021-09-30 22:17:28 +0800 |
commit | c5220944d2acdb912c129fc82ac8a83d24e9845d (patch) | |
tree | 8cea32d295c7bde273cfe3a14b6044463aaec155 /test/test_static.py | |
parent | 37144d68499217d086c26a2030e6e9f6f7342152 (diff) | |
download | unit-c5220944d2acdb912c129fc82ac8a83d24e9845d.tar.gz unit-c5220944d2acdb912c129fc82ac8a83d24e9845d.tar.bz2 |
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"
}
Diffstat (limited to 'test/test_static.py')
-rw-r--r-- | test/test_static.py | 4 |
1 files changed, 3 insertions, 1 deletions
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": { |