We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom headers added with SetCustomHeaders should be added to all requests made with the client.
The custom headers added with SetCustomHeaders are not added to requests made with the client.
vault-client-go 0.4.0
package main import ( "context" "fmt" "log" "net/http" "github.com/hashicorp/vault-client-go" "github.com/hashicorp/vault-client-go/schema" ) func handler(w http.ResponseWriter, r *http.Request) { fmt.Printf("Accept-Encoding: %s\n", r.Header.Get("accept-encoding")) fmt.Printf("Amazing: %s\n", r.Header.Get("amazing")) } func listen() { http.HandleFunc("/", http.HandlerFunc(handler)) http.ListenAndServe(":9393", nil) } func main() { go listen() // Get a Vault client client, _ := vault.New( vault.WithAddress("http://localhost:9393"), ) headers := make(http.Header) headers.Set("amazing", "very") err := client.SetCustomHeaders(headers) if err != nil { log.Fatalln(err) } _, _ = client.Auth.JwtOidcRequestAuthorizationUrl( context.Background(), schema.JwtOidcRequestAuthorizationUrlRequest{ RedirectUri: "http://localhost:9393/oidc/callback", Role: "default_role", }, vault.WithCustomHeaders(headers), ) }
The text was updated successfully, but these errors were encountered:
Hi @nyxi, thanks for reporting this bug!
Somehow the wiring was never done for custom headers. I believe I have a fix for this in #237
Sorry, something went wrong.
Fixed and released in 0.4.1. Thanks again!
Successfully merging a pull request may close this issue.
Expected Behavior
Custom headers added with SetCustomHeaders should be added to all requests made with the client.
Current Behavior
The custom headers added with SetCustomHeaders are not added to requests made with the client.
Failure Information
vault-client-go 0.4.0
Steps to Reproduce
The text was updated successfully, but these errors were encountered: