mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 04:16:31 +02:00
Do not allow the same header map to be shared across requests. (#7690)
This commit is contained in:
parent
a68f67a1f3
commit
9a3369c566
@ -673,7 +673,6 @@ func (c *Client) NewRequest(method, requestPath string) *Request {
|
||||
token := c.token
|
||||
mfaCreds := c.mfaCreds
|
||||
wrappingLookupFunc := c.wrappingLookupFunc
|
||||
headers := c.headers
|
||||
policyOverride := c.policyOverride
|
||||
c.modifyLock.RUnlock()
|
||||
|
||||
@ -718,10 +717,7 @@ func (c *Client) NewRequest(method, requestPath string) *Request {
|
||||
req.WrapTTL = DefaultWrappingLookupFunc(method, lookupPath)
|
||||
}
|
||||
|
||||
if headers != nil {
|
||||
req.Headers = headers
|
||||
}
|
||||
|
||||
req.Headers = c.Headers()
|
||||
req.PolicyOverride = policyOverride
|
||||
|
||||
return req
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user