mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-03 03:58:01 +00:00
Pass user/pass for HTTP Basic Authentication in URL parameters (#2469)
This commit is contained in:
committed by
Vishal Nayak
parent
ef94004ad7
commit
ee177d85f8
@@ -333,6 +333,7 @@ func (c *Client) NewRequest(method, path string) *Request {
|
|||||||
req := &Request{
|
req := &Request{
|
||||||
Method: method,
|
Method: method,
|
||||||
URL: &url.URL{
|
URL: &url.URL{
|
||||||
|
User: c.addr.User,
|
||||||
Scheme: c.addr.Scheme,
|
Scheme: c.addr.Scheme,
|
||||||
Host: c.addr.Host,
|
Host: c.addr.Host,
|
||||||
Path: path,
|
Path: path,
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ func (r *Request) ToHTTP() (*http.Request, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
req.URL.User = r.URL.User
|
||||||
req.URL.Scheme = r.URL.Scheme
|
req.URL.Scheme = r.URL.Scheme
|
||||||
req.URL.Host = r.URL.Host
|
req.URL.Host = r.URL.Host
|
||||||
req.Host = r.URL.Host
|
req.Host = r.URL.Host
|
||||||
|
|||||||
Reference in New Issue
Block a user