From e7be7b8c615a5fc3de900ebe2914d9ced7377b9f Mon Sep 17 00:00:00 2001 From: GLYASAI Date: Thu, 17 Sep 2020 14:16:34 +0800 Subject: [PATCH] nil pointer ref --- gateway/annotations/rewrite/rewrite.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gateway/annotations/rewrite/rewrite.go b/gateway/annotations/rewrite/rewrite.go index 5b8673f2b..84cca041c 100644 --- a/gateway/annotations/rewrite/rewrite.go +++ b/gateway/annotations/rewrite/rewrite.go @@ -119,7 +119,8 @@ func convert(in map[string]string) []*Rewrite { } rewrite := m[sli[0]] if rewrite == nil { - m[k] = &Rewrite{} + rewrite = &Rewrite{} + m[sli[0]] = rewrite } switch sli[1] { case "regex":