mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +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{
|
||||
Method: method,
|
||||
URL: &url.URL{
|
||||
User: c.addr.User,
|
||||
Scheme: c.addr.Scheme,
|
||||
Host: c.addr.Host,
|
||||
Path: path,
|
||||
|
||||
@@ -55,6 +55,7 @@ func (r *Request) ToHTTP() (*http.Request, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
req.URL.User = r.URL.User
|
||||
req.URL.Scheme = r.URL.Scheme
|
||||
req.URL.Host = r.URL.Host
|
||||
req.Host = r.URL.Host
|
||||
|
||||
Reference in New Issue
Block a user