api/handler/rpc: fix metadata cleanup (#1451)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
6c6c5359b1
commit
d6bef84de0
@ -289,9 +289,9 @@ func requestPayload(r *http.Request) ([]byte, error) {
|
|||||||
for k, v := range md {
|
for k, v := range md {
|
||||||
if strings.HasPrefix(k, "x-api-field-") {
|
if strings.HasPrefix(k, "x-api-field-") {
|
||||||
matches[strings.TrimPrefix(k, "x-api-field-")] = v
|
matches[strings.TrimPrefix(k, "x-api-field-")] = v
|
||||||
}
|
|
||||||
delete(md, k)
|
delete(md, k)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// restore context without fields
|
// restore context without fields
|
||||||
ctx = metadata.NewContext(ctx, md)
|
ctx = metadata.NewContext(ctx, md)
|
||||||
|
Loading…
Reference in New Issue
Block a user