api: use http request Clone (#1458)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
77176ca068
commit
5e8581146a
@ -262,7 +262,7 @@ func (r *staticRouter) endpoint(req *http.Request) (*endpoint, error) {
|
|||||||
for k, v := range matches {
|
for k, v := range matches {
|
||||||
md[fmt.Sprintf("x-api-field-%s", k)] = v
|
md[fmt.Sprintf("x-api-field-%s", k)] = v
|
||||||
}
|
}
|
||||||
*req = *req.WithContext(context.WithValue(ctx, metadata.MetadataKey{}, md))
|
*req = *req.Clone(context.WithValue(ctx, metadata.MetadataKey{}, md))
|
||||||
break pathLoop
|
break pathLoop
|
||||||
}
|
}
|
||||||
if !pMatch {
|
if !pMatch {
|
||||||
|
Loading…
Reference in New Issue
Block a user