Support the combination of nginx variables and text value for annotation upstream-hash-by.

This commit is contained in:
agile6v 2020-05-19 11:51:30 +08:00
parent b18ea267a8
commit c035a144f8
6 changed files with 95 additions and 22 deletions

View file

@ -39,6 +39,7 @@ func TestParse(t *testing.T) {
expected string
}{
{map[string]string{annotation: "$request_uri"}, "$request_uri"},
{map[string]string{annotation: "$request_uri$scheme"}, "$request_uri$scheme"},
{map[string]string{annotation: "false"}, "false"},
{map[string]string{}, ""},
{nil, ""},