mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 07:11:02 +00:00
enable auth for endpoint
This commit is contained in:
parent
1774062f24
commit
f58ebbe505
1 changed files with 4 additions and 0 deletions
|
|
@ -2207,6 +2207,10 @@ func (c *InternalClient) ImportIndexKeys(ctx context.Context, uri *pnet.URI, ind
|
|||
return errors.Wrap(err, "creating request")
|
||||
}
|
||||
httpReq.Header.Set("User-Agent", "pilosa/"+pilosa.Version)
|
||||
token, ok := ctx.Value("token").(string)
|
||||
if ok && token != "" {
|
||||
httpReq.Header.Set("Authorization", token)
|
||||
}
|
||||
|
||||
// Execute request against the host.
|
||||
resp, err := c.executeRetryableRequest(httpReq.WithContext(ctx))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue